- Code: Select all
ls -l /home/
shows that by default, user X home is readable by all users.
- Code: Select all
grep user /etc/group |sed 's/^.*://'
will give the user list of group "users".
If you want to restrict access of all users to themselves only, try this:
- Code: Select all
# chown -R userX:userX /home/userX
(command as root user)
or more globally if many users:
- Code: Select all
# for X in `grep user /etc/group |sed 's/^.*://; s/,/ /g'` ;do echo $X ;chown -R $X:$X /home/$X ;done
Default
adduser configuration is stored at
/etc/adduser.conf# If SETGID_HOME is "yes" home directories for users with their own group the setgid bit will be set.
This was the default for versions << 3.13 of adduser.
Because it has some bad side effects we no longer do this per default.
If you want it nevertheless you can still set it here.
SETGID_HOME=no