Chinaunix首页 | 论坛 | 博客
  • 博客访问: 385796
  • 博文数量: 74
  • 博客积分: 2010
  • 博客等级: 大尉
  • 技术积分: 695
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-21 17:34
文章分类
文章存档

2011年(1)

2010年(1)

2009年(72)

我的朋友

分类: LINUX

2009-07-21 15:17:38


Linux 影响useradd的文件
按照①=》②=》③的模式进行用户的建立


*①:【/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 file
2 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: :help  -:go up dir  D:delete  R:rename  s:sort-by  x:exec
" =============================================================
../
./
.kde/
.bash_logout
.bash_profile
.bashrc
.emacs
.zshrc
阅读(1723) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~