Thursday, March 1, 2012

Multiple users sharing home

Multiple users sharing home

add a group in common that should be used as primary group

groupadd groupname

add each user pointing to the new home (the first one will create the folder)  and stablish the created group as primary group

useradd -c "gecos" -d /home/homename -g groupname-m -s /bin/bash username1
useradd -c " gecos" -d /home/homename -g groupname-m -s /bin/bash username2

Edit their .bash_profile and set their umask to g=rwx.

umask 0002

change the permissions of the home directory recursively so the primary group have full access

chmod -R 770 /home/homename