I am working in a lab where we are running Linux (Debian and Ubuntu). Usernames and group names are handled by NIS and yp. We have some common users that everybody has access to that run the experiments and then we each have our own users in addition there is a common group that we are all a member of.
How can I make such that all files and directories on the shared
chmod -R 664 /home
chgrp -R commongroup /home
Both Debian and Ubuntu ship with pam_umask. This allows you to configure umask in
/etc/login.defs and have them apply system-wide, regardless of how a user logs in.
To enable it, you may need to add a line to
session optional pam_umask.so
or it may already be enabled. Then edit
/etc/login.defs and change the
UMASK line to
(the default is
Note that users may still override umask in their own
~/.bashrc or similar, but (at least on new Debian and Ubuntu installations) there shouldn't be any overriding of umask in
/etc/bash.bashrc. (If there are, just remove them.)