记得以前没有学习LINUX时,曾听说过一句话,不要用windows的方式去思考linux的工作原理,但是从记忆的角度来说我们可以做些联想,而不需太钻尖。今天介绍配置文件/etc/login.defs。
     
解析/etc/login.defs 配置文件 #*REQUIRED*
#Directorywheremailboxesreside,_or_nameoffile,relativetothe
#homedirectory.Ifyou_do_defineboth,MAIL_DIRtakesprecedence.
#QMAIL_DIRisforQmail
#
#QMAIL_DIRMaildir
MAIL_DIR/var/spool/mail注:创建用户时,要在目录/var/spool/mail中创建一个用户mail文件;
#MAIL_FILE.mail
#Passwordagingcontrols:
#
#PASS_MAX_DAYSMaximumnumberofdaysapasswordmaybeused.
#PASS_MIN_DAYSMinimumnumberofdaysallowedbetweenpasswordchanges.
#PASS_MIN_LENMinimumacceptablepasswordlength.
#PASS_WARN_AGENumberofdayswarninggivenbeforeapasswordexpires.
#
PASS_MAX_DAYS99999注:用户的密码不过期最多的天数;
PASS_MIN_DAYS0注:密码修改之间最小的天数;
PASS_MIN_LEN5注:密码最小长度;
PASS_WARN_AGE7注:
#
#Min/maxvaluesforautomaticuidselectioninuseradd
#
UID_MIN500注:最小UID为500,也就是说添加用户时,UID是从500开始的;
UID_MAX60000注:最大UID为60000;
#
#Min/maxvaluesforautomaticgidselectioningroupadd
#
GID_MIN500注:GID是从500开始;
GID_MAX60000
#
#Ifdefined,thiscommandisrunwhenremovingauser.
#Itshouldremoveanyat/cron/printjobsetc.ownedby
#theusertoberemoved(passedasthefirstargument).
#
#USERDEL_CMD/usr/sbin/userdel_local
#
#Ifuseraddshouldcreatehomedirectoriesforusersbydefault
#OnRHsystems,wedo.ThisoptionisORedwiththe-mflagon
#useraddcommandline.
#
CREATE_HOMEyes注:是否创用户家目录,要求创建;