記得以前沒有學習LINUX時,曾聽說過一句話,不要用windows的方式去思考linux的工作原理,但是從記憶的角度來說我們可以做些聯想,而不需太鑽尖。今天介紹配置檔案/etc/login.defs。
解析/etc/login.defs 配置檔案
<tdstyle=”word-break:break-all”width=”100%”bgcolor=#ffffff>#*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注:是否創使用者家目錄,要求建立;
解析/etc/login.defs 配置檔案
<tdstyle=”word-break:break-all”width=”100%”bgcolor=#ffffff>#*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注:是否創使用者家目錄,要求建立;