|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Security Want to know if you should really apply the latest kernel patch? Want to know how to configure your firewall? Discuss any Security related topics in here! |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
How to modify default settings for adding new users -- that all directories and files created by new users should have full access permissions (rwx) for the owner and none for group members and all other users?
Thanks |
|
|||
|
Specifying the “-D” switch on its own will simply display the default settings, while specifying -D in conjunction with other switches will change the defaults to those values.
# useradd -D GROUP=100 INACTIVE=-1HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel # useradd -D -s /bin/sh # useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/sh SKEL=/etc/skel As you can see, this changes the default shell for created users from “bash” to “sh”. Perameters d home directory -s starting program (shell) -p password -g (primary group assigned to the users) -G (Other groups the user belongs to) -m (Create the user’s home directory ) |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|