I d like to set the home directories permissions as 755 when i add the user via useradd.
How can i do this?
Thanks.
|
I d like to set the home directories permissions as 755 when i add the user via useradd. How can i do this? Thanks.
| |||
|
feedback
|
|
Look at the UMASK parameter in /etc/login.defs:
(from This is a mask, so the default of 0077 will give you home directory permissions 700, 0022 will give 755. Interestingly, OpenSuse uses 0022 by default. If you want to change the default permissions for the files your users create in their home directories, you need the | |||||
feedback
|
|
here you can define default values for useradd. -- | |||
feedback
|
|
You could write a wrapper utility script that calls both useradd and chmod. But why would you want this? People expect /home/username to be private. It probably would be better to give a separate, shared directory to each user. | |||
feedback
|
|
You could use ''adduser'' after editing the /etc/adduser.conf file and setting DIR_MODE=0755. That's opposed to ''useradd'' There are various customisations that you can do in /etc/adduser.conf. What linux are you using. Ubuntu has ''adduser''. | |||
|
feedback
|