LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-12-2013, 01:20 PM   #1
the ber
LQ Newbie
 
Registered: Aug 2006
Location: Germany
Distribution: LMDE Cinnamon
Posts: 10

Rep: Reputation: 4
Mount directories to multiple /home directories?


I am moving from XP to LMDE. To make this as smooth as possible for the rest of the family I would like to mount some common directories to each user's /home/user-name directory. This way when they open their home directory they can also directly access the directory to which everyone has access. Only one user is logged on at one time.
I have already done sort of the same thing by editing fstab to mount these directories to /home at boot. However this requires each user to go up one level to be able to access the common directories. It's not a big deal to have to do that, but it would increase the level of acceptance and make the transition easier. Is this possible?
 
Old 08-12-2013, 01:54 PM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,324

Rep: Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730
I would mount the folder[s] under /media/ then place soft links in each user's home directory to them. I do that myself for data drives and I'm the only user on my system.
 
Old 08-12-2013, 01:57 PM   #3
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
You can do that with "bind" mounts - see the man page on "mount" for additional detals. The basic way is just
"mount --bind olddir newdir.

OR, you can do this with symbolic links - just create a symbolic link in each directory that points to the shared directory. ("ln -s existing-dir pointername"). You can also add the link to a skeleton directory for all users (/etc/skel) then, when a user is added (see the manpage for useradd, under "-m" option)

Of the two, symbolic links are easier, and less cumbersome to deal with.
 
1 members found this post helpful.
Old 08-14-2013, 02:04 PM   #4
the ber
LQ Newbie
 
Registered: Aug 2006
Location: Germany
Distribution: LMDE Cinnamon
Posts: 10

Original Poster
Rep: Reputation: 4
Thanks to both of you. I used soft links; seems trivial now but I guess it's part of the curve. $ ln -s /home/MUSIC
 
Old 08-14-2013, 02:19 PM   #5
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,324

Rep: Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730
I would still be tempted to mount the devices/directories somewhere other than /home/ unless you specifically want to back them up in the same backup as your users' home directories, for example. It doesn't really matter but I think you may find things easier in the long run if you mount other drives under /mnt/ or /media/. For instance copying all of home onto one of the drives could cause recursion (as could the simlinks, of course, but they're easily ignored by things like rsync).

Last edited by 273; 08-14-2013 at 02:20 PM.
 
Old 08-15-2013, 07:14 AM   #6
the ber
LQ Newbie
 
Registered: Aug 2006
Location: Germany
Distribution: LMDE Cinnamon
Posts: 10

Original Poster
Rep: Reputation: 4
Hi 273, that's a good point. I'm not yet at the point to where I know how to intelligently do back-ups; I just need to make the transition from XP comfortable for the rest of the family. Re-mounting the extra directories to /mnt and then soft-linking them will also do the trick. I'll come back later when I try to set up back-ups.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to mount samba home directories as read/write? Larry James Linux - Networking 8 06-14-2011 12:23 PM
Remove Multiple Home Directories paparob Linux - Newbie 3 04-24-2008 03:57 AM
Using a partition for multiple distro home directories koady Linux - Hardware 3 08-18-2007 02:24 AM
Searching multiple directories and sub directories for a file jeep99899 Linux - Newbie 2 10-13-2005 01:23 PM
mapping home directories to different mount point jjohnston62 Linux - General 5 11-05-2003 05:42 PM


All times are GMT -5. The time now is 03:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration