×ðÁú¿­Ê±¹ÙÍøµÇ¼

LinuxÓû§ÃÜÂë´æ·ÅλÖü°Çå¾²ÐÔÆÊÎö

LinuxÓû§ÃÜÂë´æ·ÅλÖü°Çå¾²ÐÔÆÊÎö

ÔÚLinux²Ù×÷ϵͳÖÐ £¬Óû§µÄÃÜÂëÊÇÒÔ¼ÓÃÜÐÎʽ´æ´¢µÄ £¬ÒÔÈ·±£Óû§µÄÒþ˽ºÍÇå¾²¡£±¾ÎĽ«Ì½ÌÖLinuxÓû§ÃÜÂëµÄ´æ·ÅλÖÃÒÔ¼°¶ÔÆäÇå¾²ÐÔ¾ÙÐÐÆÊÎö £¬²¢ÌṩһЩ´úÂëʾÀýÀ´×ÊÖú¶ÁÕ߸üºÃµØÃ÷È·¡£

1. LinuxÓû§ÃÜÂë´æ·ÅλÖÃ

ÔÚ´ó´ó¶¼Linux¿¯ÐаæÖÐ £¬Óû§µÄÃÜÂë´æ·ÅÔÚ/etc/shadowÎļþÖС£/etc/shadowÎļþÊÇÖ»ÓÐrootÓû§¿É¶ÁÈ¡µÄÎļþ £¬ÆäÖаüÀ¨ÁËÓû§µÄ¼ÓÃÜÃÜÂë¡£ÏÂÃæÊÇÒ»¸ö/etc/shadowÎļþµÄʾÀý£º

root:$6$nGLjUblr$XzN7O1wc/POpUW0RskYeDwL7ZY/M2JRsur7OTzVEpJAp8RIz9El/5D6vo1D2Rw27Ga9eK0ttXFsFAjBReFALm.:18447:0:99999:7:::
user1:$6$kVdQD4O8$bT2nI346emSEN4wspfQNvjgSwd.Aqvtq5F2Zz0jiPvDGd8gktC0vzUn5XdhEhMq8VicAvX.7TP9PJH2uPP0gR0:18447:0:99999:7:::

µÇ¼ºó¸´ÖÆ

ÿÐдú±íÒ»¸öÓû§µÄÃÜÂëÐÅÏ¢ £¬ÒÔðºÅÍÑÀë¡£ÆäÖеڶþ¸ö×Ö¶ÎÊǾ­ÓɼÓÃܺóµÄÃÜÂë £¬½ÓÄɵÄÊÇSHA-512Ëã·¨£¨ÒÔ$6$¿ªÍ·£© £¬È·±£ÃÜÂëÔڴ洢ʱÊǾ­ÓɼÓÃÜ´¦ÀíµÄ¡£

2. Çå¾²ÐÔÆÊÎö

Ö»¹ÜLinuxÓû§ÃÜÂë´æ·ÅÔÚ/etc/shadowÎļþÖо­ÓɼÓÃÜ´¦Àí £¬µ«ÈÔÈ»±£´æһЩDZÔÚµÄÇ徲Σº¦ £¬ÀýÈ磺

±©Á¦Æƽ⹥»÷£ººÚ¿Í¿ÉÒÔʵÑéͨ¹ýһֱʵÑé²î±ðµÄÃÜÂëÀ´ÆƽâÓû§µÄÃÜÂ롣ΪÁ˱ÜÃâÕâÖÖ¹¥»÷ £¬¿ÉÒÔÉèÖÃÃÜÂëÕ½ÂÔ£¨ÈçÃÜÂ볤¶È¡¢ÖØƯºóÒªÇ󣩲¢°´ÆÚ¸ü¸ÄÃÜÂë¡£

ÌáÈ¡/etc/shadowÎļþ£ºÈôÊǺڿÍÄܹ»»ñÈ¡µ½/etc/shadowÎļþµÄ»á¼ûȨÏÞ £¬×ÝÈ»ÃÜÂëÒѼÓÃÜ £¬µ«ÈÔÈ»¿ÉÄܾÙÐÐÀëÏßÆƽâ¡£Òò´Ë £¬±£»¤/etc/shadowÎļþµÄ»á¼ûȨÏÞÖÁ¹ØÖ÷Òª¡£

ÈõÃÜÂ룺¼òÆÓÒ×ÍƲâµÄÃÜÂëÈÝÒ×±»ºÚ¿ÍÆƽâ¡£½¨ÒéÓû§Ê¹ÓÃÖØ´óµÄÃÜÂë×éºÏ £¬²¢°´ÆÚ¸ü¸ÄÃÜÂëÒÔÌá¸ßϵͳÇå¾²ÐÔ¡£

3. ´úÂëʾÀý

3.1. ¸ü¸ÄÓû§ÃÜÂë

ͨ¹ýpasswdÏÂÁî¿ÉÒÔÇáËɸü¸ÄÓû§ÃÜÂë £¬Ê¾Àý´úÂëÈçÏ£º

passwd username

µÇ¼ºó¸´ÖÆ

3.2. ÉèÖÃÃÜÂëÕ½ÂÔ

ͨ¹ýÐÞ¸Ä/etc/login.defsÎļþ¿ÉÒÔÉèÖÃÃÜÂëÕ½ÂÔ £¬ÀýÈçÃÜÂ볤¶È¡¢ÓâÆÚʱ¼äµÈ £¬Ê¾Àý´úÂëÈçÏ£º

sudo vim /etc/login.defs

µÇ¼ºó¸´ÖÆ

3.3. Éó²éÃÜÂë¼ÓÃÜËã·¨

ͨ¹ýman cryptÏÂÁî¿ÉÒÔÉó²éLinuxϵͳ֧³ÖµÄÃÜÂë¼ÓÃÜËã·¨ £¬Ê¾Àý´úÂëÈçÏ£º

man crypt

µÇ¼ºó¸´ÖÆ

½áÓï

ÔÚLinuxϵͳÖÐ £¬Óû§ÃÜÂëµÄÇå¾²ÐÔÖÁ¹ØÖ÷Òª¡£Í¨¹ý¶ÔÃÜÂë´æ·ÅλÖúÍÇå¾²ÐÔÆÊÎöµÄÏàʶ £¬Óû§¿ÉÒÔÔöÇ¿¶ÔÃÜÂëµÄ±£»¤²½·¥ £¬´Ó¶ø°ü¹ÜϵͳµÄÇå¾²¡£Í¬Ê± £¬Í¨¹ýºÏÊʵÄÃÜÂëÖÎÀíÕ½ÂԺͰ´ÆÚµÄÇå¾²Éó¼Æ £¬¿ÉÒÔ½øÒ»²½Ìá¸ßϵͳµÄÇå¾²ÐÔ £¬±ÜÃâDZÔÚµÄÇ徲Σº¦¡£

Ï£Íû±¾ÎÄÄܹ»×ÊÖú¶ÁÕ߸üºÃµØÏàʶLinuxÓû§ÃÜÂëµÄ´æ·ÅλÖü°Çå¾²ÐÔ £¬²¢½ÓÄÉÊʵ±µÄ²½·¥±£»¤Óû§ÃÜÂëºÍϵͳÇå¾²¡£

ÒÔÉϾÍÊÇLinuxÓû§ÃÜÂë´æ·ÅλÖü°Çå¾²ÐÔÆÊÎöµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

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

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

QR code
ÍøÕ¾µØͼ