Linux will copy the the contents of /etc/skel when a new user is created. I want to have a sub-directory in each user's home directory, MyStevedore. I want this directory to have the owner be the new user and the group to be the group stevedore with the permissions drwxrwxr-x. The user is not a member of the group stevedore.
Tell me more
×
Unix & Linux Stack Exchange is a question and answer site for
users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
|
|
||||
migrated from serverfault.com Feb 13 '11 at 8:34
|
Assuming you're using On Debian and derivatives (including Ubuntu), once
|
|||
|
|
|
You could add an if statement to the .bash_profile script in /etc/skel that will check if the folder exists. If it doesn't exist it will create it and set the permissions. The first time a new user logs in the folder will be created. |
|||
|
|
/usr/local/sbin/adduser.localwill be called when you run adduser to create an account. – Zoredache Oct 27 '10 at 20:17