Linux用户管理解 影响useradd的文件
时间:2009-07-21 来源:loris33
Linux 影响useradd的文件
按照①=》②=》③的模式进行用户的建立
*①:【/etc/login.defs 文件是当创建用户时,系统对账户管理的宏观规划】
*②:【/etc/default/useradd 文件是当创建用户时,系统对账户本身的共通属性】
*③:【/etc/skel/* 文件是当创建用户时,系统对账户模板的个性应用】
*①:【/etc/login.defs 文件是当创建用户时,系统对账户管理的宏观规划】
[root@rhel52 etc]# vim /etc/login.defs 1 # *REQUIRED*2 # Directory where mailboxes reside, _or_ name of file, relative to the 3 # home directory.If you _do_ define both, MAIL_DIR takes precedence. 4 # QMAIL_DIR is for Qmail 5 # 6 #QMAIL_DIRMaildir 7 MAIL_DIR/var/spool/mail 8 #MAIL_FILE.mail 9 10 # Password aging controls: 11 # 12 # PASS_MAX_DAYS Maximum number of days a password may be used. 13 # PASS_MIN_DAYS Minimum number of days allowed between password changes. 14 # PASS_MIN_LENMinimum acceptable password length. 15 # PASS_WARN_AGE Number of days warning given before a password expires. 16 # 17 PASS_MAX_DAYS 99999 18 PASS_MIN_DAYS 0 19 PASS_MIN_LEN2 20 PASS_WARN_AGE 7 21 22 # 23 # Min/max values for automatic uid selection in useradd 24 # |
*②:【/etc/default/useradd 文件是当创建用户时,系统对账户本身的共通属性】
[root@rhel52 etc]# vim /etc/default/useradd 1 # useradd defaults file2 GROUP=100 3 HOME=/home #user home 4 INACTIVE=-1#not stop the account when expire 5 EXPIRE=#this day it will stop 6 SHELL=/bin/bash#shell cat 7 SKEL=/etc/skel #copy these file to new user's home【注意他的指向】 |
*③:【/etc/skel/* 文件是当创建用户时,系统对账户模板的个性应用】
[root@rhel52 etc]# vim /etc/skel/ " =============================================================" Netrw Directory Listing(netrw v102) " /etc/skel " Sorted by name " Sort sequence: [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec " ============================================================= ../ ./ .kde/ .bash_logout .bash_profile .bashrc .emacs .zshrc |
相关阅读 更多 +