尊龙凯时人生就是博

ÉîÈë½â¶ÁLinux chageÏÂÁîµÄÓ÷¨

Linux²Ù×÷ϵͳÊÇÒ»¸ö¿ªÔ´µÄ²Ù×÷ϵͳ £¬ÆÕ±éÓ¦ÓÃÓÚЧÀÍÆ÷ºÍСÎÒ˽ÈËÅÌËã»úÖС£ÆäÖÐÓÐһЩÏÂÁîÔÚϵͳÖÎÀíºÍÇå¾²·½ÃæÆð×ÅÖ÷Òª×÷Óà £¬ÆäÖоͰüÀ¨ÁËchageÏÂÁî¡£chageÏÂÁî¿ÉÒÔÓÃÀ´ÖÎÀíÓû§ÕË»§µÄÃÜÂëÓâÆÚÕ½ÂÔ £¬ÃÜÂë×î¶ÌʹÓÃÏÞÆÚ¡¢×ʹÓÃÏÞÆÚ¡¢ÃÜÂëÓâÆÚÌáÐѵÈ¡£

ÔÚ±¾ÎÄÖÐ £¬½«ÏêϸÆÊÎöLinux chageÏÂÁîµÄ¸ß¼¶Ó÷¨ £¬²¢ÌṩÏêϸµÄ´úÂëʾÀý×ÊÖú¶ÁÕ߸üºÃµØÃ÷È·ºÍÓ¦ÓÃÕâ¸öÏÂÁî¡£

1. chageÏÂÁîµÄ»ù±¾Ó÷¨

ÔÚLinuxϵͳÖÐ £¬chageÏÂÁîÓÃÓÚÐÞ¸ÄÓû§ÕË»§µÄÃÜÂëÓâÆÚÐÅÏ¢ £¬Æä»ù±¾Óï·¨ÈçÏ£º

chage [options] username

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬usernameÊÇÒª²Ù×÷µÄÓû§Ãû¡£³£ÓõÄÑ¡Ïî°üÀ¨£º

-M, –maxdays £ºÉèÖÃÃÜÂëµÄ×ʹÓÃÏÞÆÚ¡£

-m, –mindays £ºÉèÖÃÃÜÂëµÄ×î¶ÌʹÓÃÏÞÆÚ¡£

-W, –warndays £ºÃÜÂëÓâÆÚÌõ¼þÐÑÓû§ÐÞ¸ÄÃÜÂëµÄÌìÊý¡£

-I, –inactive £ºÉèÖÃÕË»§ÎÞÔ˶¯ºó±»Ëø¶¨µÄÌìÊý¡£

2. chageÏÂÁîµÄ¸ß¼¶Ó÷¨

2.1 Éó²éÓû§ÕË»§µÄÃÜÂëÓâÆÚÐÅÏ¢

ʹÓÃchageÏÂÁî¿ÉÒÔÉó²éÓû§ÕË»§µÄÃÜÂëÓâÆÚÐÅÏ¢ £¬¿ÉÒÔÏàʶµ½ÃÜÂëµÄ×î´óʹÓÃÏÞÆÚ¡¢×î¶ÌʹÓÃÏÞÆÚ¡¢ÃÜÂëÓâÆÚÌáÐѵÈ¡£

ÀýÈç £¬Éó²éÓû§”testuser”µÄÃÜÂëÓâÆÚÐÅÏ¢£º

chage -l testuser

µÇ¼ºó¸´ÖÆ

2.2 ÉèÖÃÃÜÂëµÄ×ʹÓÃÏÞÆÚ

ͨ¹ýchageÏÂÁîÉèÖÃÓû§ÃÜÂëµÄ×ʹÓÃÏÞÆÚ £¬¿ÉÒÔÇ¿ÖÆÓû§°´ÆÚÐÞ¸ÄÃÜÂë £¬ÔöǿϵͳÇå¾²ÐÔ¡£

ÀýÈç £¬ÉèÖÃÓû§”testuser”µÄÃÜÂë×ʹÓÃÏÞÆÚΪ90Ì죺

chage -M 90 testuser

µÇ¼ºó¸´ÖÆ

2.3 ÉèÖÃÃÜÂëµÄ×î¶ÌʹÓÃÏÞÆÚ

ÉèÖÃÃÜÂëµÄ×î¶ÌʹÓÃÏÞÆÚ¿ÉÒÔ±ÜÃâÓû§ÆµÈÔÐÞ¸ÄÃÜÂë £¬Ìá¸ßÃÜÂëµÄÇå¾²ÐÔ¡£

ÀýÈç £¬ÉèÖÃÓû§”testuser”µÄÃÜÂë×î¶ÌʹÓÃÏÞÆÚΪ7Ì죺

chage -m 7 testuser

µÇ¼ºó¸´ÖÆ

2.4 ÉèÖÃÃÜÂëÓâÆÚÌáÐÑ

ͨ¹ýÉèÖÃÃÜÂëÓâÆÚÌáÐÑ £¬¿ÉÒÔÌáÐÑÓû§ÊµÊ±ÐÞ¸ÄÃÜÂë £¬×èÖ¹ÃÜÂëÓâÆÚµ¼ÖÂÕË»§±»Ëø¶¨¡£

ÀýÈç £¬ÉèÖÃÓû§”testuser”µÄÃÜÂëÓâÆÚÌáÐÑΪ7Ì죺

chage -W 7 testuser

µÇ¼ºó¸´ÖÆ

3. ÏÖʵ°¸Àý

ÏÂÃæÒÔÒ»¸öÏÖʵ°¸ÀýÀ´Õ¹Ê¾chageÏÂÁîµÄ¸ß¼¶Ó÷¨¡£

ÎÒÃÇÓÐÒ»¸öÓû§ÕË»§”testuser” £¬ÎÒÃÇÒªÇó¸ÃÓû§Ã¿¸öÔ±ØÐèÐÞ¸ÄÃÜÂëÒ»´Î £¬ÃÜÂëµÄÓÐÓÃÆÚΪ30Ìì £¬ÃÜÂëÓâÆÚÇ°7ÌìÌáÐÑÓû§ÐÞ¸ÄÃÜÂë¡£ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏ°취À´ÊµÏÖ£º

# ÉèÖÃÃÜÂë×ʹÓÃÏÞÆÚΪ30Ìì
chage -M 30 testuser

# ÉèÖÃÃÜÂë×î¶ÌʹÓÃÏÞÆÚΪ0£¬ÔÊÐíÓû§Á¬Ã¦ÐÞ¸ÄÃÜÂë
chage -m 0 testuser

# ÉèÖÃÃÜÂëÓâÆÚÌáÐÑΪ7Ìì
chage -W 7 testuser

µÇ¼ºó¸´ÖÆ

½áÓï

ͨ¹ý±¾ÎĶÔLinux chageÏÂÁîµÄ¸ß¼¶Ó÷¨ÆÊÎö £¬¶ÁÕß¿ÉÒÔ¸üºÃµØÏàʶÔõÑùÖÎÀíÓû§ÕË»§µÄÃÜÂëÓâÆÚÕ½ÂÔ £¬Ìá¸ßϵͳµÄÇå¾²ÐÔ¡£Ï£Íû±¾ÎÄÌṩµÄÄÚÈݶԶÁÕßÓÐËù×ÊÖú £¬½Ó´ý¸÷È˶à¼Óʵ¼ùºÍ̽Ë÷¡£

ÒÔÉϾÍÊÇÉîÈë½â¶ÁLinux chageÏÂÁîµÄÓ÷¨µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是博ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是博ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ