LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sharing one home directory with multiple users (http://www.linuxquestions.org/questions/linux-software-2/sharing-one-home-directory-with-multiple-users-321109/)

cwolf78 05-07-2005 05:45 PM

Sharing one home directory with multiple users
 
How do I share one "home directory" with multiple users... in case you are wondering... I am doing this to comply with the VSFTPD CHROOT file which allows me to set a list of users who are automatically chrooted to their home directory and locked into it. In my case I have a list of users that I want to chroot into a directory named PUB... YaST will only let me assign PUB to one user.
:confused:

bigrigdriver 05-07-2005 09:06 PM

What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.

exodist 05-07-2005 09:19 PM

chown root:[group] /home/dir-to-share #replace [group] with a group all the users are a member of
chmod -R 770 /home/dir-to-share #the second 7 gives full access to group members, -R makes it recursive
edit /etc/passwd
change the home directory column for the users in question to /home/dir-to-share

note: some programs do not run when config files have certain permissions, those will dislike this config and may complain or fail all-out.

cwolf78 05-08-2005 02:09 AM

Quote:

Originally posted by bigrigdriver
What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.
i see what you are saying... except that I want to chroot multiple users into one directory (pub)... the only way that I know to do that is to add users to a chroot list that sends them to their home directory and locks them in. Can I some how make all the users I want to chroot into pub a member of a group that forces them to use pub as their home directory ???
:confused: :study: :newbie:

cwolf78 05-08-2005 11:32 AM

Quote:

Originally posted by bigrigdriver
What about group permissions? Set a group permission for PUB, and add the users names to that group. One user is still the owner, but members of the group also have access. Which is not the same as each user having a folder, as in /home/user-1, /home/user-2, etc.
Ok, how do I set a group permission ?

cwolf78 05-08-2005 12:16 PM

Quote:

Originally posted by exodist
chown root:[group] /home/dir-to-share #replace [group] with a group all the users are a member of
chmod -R 770 /home/dir-to-share #the second 7 gives full access to group members, -R makes it recursive
edit /etc/passwd
change the home directory column for the users in question to /home/dir-to-share

note: some programs do not run when config files have certain permissions, those will dislike this config and may complain or fail all-out.

Hooray! I finally got it working! However... there is still one user who chroots but will not stay locked in the home directory... this is a user whose permissions I did a number on before I followed these instructions. Is there a way to reset that user ?
thanks again
:D

cwolf78 05-08-2005 12:25 PM

I deleted the user who was not staying locked in and gave him another account... a new account that i setup just now... it works fine. But now, the other user has suddenly stopped staying locked in to his directory ??? :confused:
Does this have to do with the UID number ?

exodist 05-08-2005 03:16 PM

no, nothing to do with the uid, not sure what would cause it to stop letting one of the users in, how many users are we talking?

cwolf78 05-08-2005 05:14 PM

Out of three users... everyone gets in... but it won't keep one user locked in. I added an alternate account for the one that would not stay chrooted and then deleted the bad account... as soon as I did that then another account that had been working fine became unable to stay chrooted.

exodist 05-08-2005 05:21 PM

what do you mean by locked in, does the user spontaniously log out? and chroot is when you make a new directory the root directory, it is when for example you connect a drive from another system w/ another linux install in it, so you mount it and chroot /path/to/filesystem and you are then runnign the os on the drive fromt he other system (it can be used for other similar things, but this is most common)

do you perhapse just mean changing directories to be in the home dir? like: cd /home/username

cwolf78 05-08-2005 06:35 PM

I am sure I am all turned around... I am getting the terms chroot and locked in from a vsftpd.conf help file. To me chroot meant that when a user logged on via FTP they were sent to a directory that I made their home... ie: /pub. After they were logged on and chrooted to /pub... they could not access any directory higher than /pub ... does that make more sense ?

exodist 05-08-2005 06:58 PM

ok I see now, chroot the ftp term, the base directory in the tree, so yes the terms do coincide, I missed the context, and the reason purpose behind this. well I think the best thing to do would be to make a pub directory, have no home directory's for the users in question, then somewhere in the config file you should be able to set a default ftp root for specific users, or at least anonymous user. not sure if this helps.


All times are GMT -5. The time now is 11:18 PM.