ºìÁªLinuxÃÅ»§
Linux°ïÖú

slackwareÏ»ָ´rootÃÜÂë

·¢²¼Ê±¼ä:2006-03-18 00:28:33À´Ô´:ºìÁª×÷Õß:thej
Ë­¶¼ÓпÉÄܶª¶«Î÷£¬ÒªÊÇ°Ñ×Ô¼º·þÎñÆ÷µÄrootÃÜÂ붪ÁËÔõô°ì£¿

û¹Øϵ£¬ÎÒÃÇÓÃÏÂÃæµÄ·½·¨»Ö¸´¡£

»Ö¸´·½·¨

¡¡·½·¨Ò»£ºÖ±½Óͨ¹ýliloÖƶ¨init="/bin/bashÆô¶¯À´ÐÞ¸ÄÃÜÂë·½·¨¶þ£ºÍ¨¹ý¹âÅÌÆô¶¯£¬¹ÒÔØ/·ÖÇø£¬ÐÞ¸Ä/etc/shadowÎļþÀ´Çå¿ÕÃÜÂë

·½·¨Ò»ÊµÏÖ¹ý³ÌÊ×ÏÈÆô¶¯Æô¶¯linux£¬µ½lilo³öÏÖµÄʱºò£¬ÎÒÃÇËæ±ã°´Ò»¼üÈÃliloͣס£¨²»Òª°´»Ø³µÅ¶£©

Õâ¸öʱºò½«³öÏÖºÍÏÂÃæÀàËƵĻ­Ãæ



ÕâÀïÎÒÃÇ¿´µ½liloÁбíÀïÃæÖ»ÓÐÒ»¸öϵͳ£¬¾ÍÊÇÆô¶¯ÏîÃû³Æ½ÐslackµÄϵͳ¡£

ÎÒÃÇÊäÈëÈçÏÂÃüÁîÆô¶¯Õâ¸öϵͳ

ÒýÓÃ:
slack init£½/bin/bash rw


×¢Ò⣺ÎÒÃÇÉÏÃæÃüÁîÀïÃæµÄslackÊǺÍÆô¶¯ÏîÃû³Æ¶ÔÓ¦µÄ¡£ÄãÔÚÄãµÄliloÀïÃæÉèÖõÄϵͳÊÇʲôÃû³Æ£¬¾ÍÓÃʲô´úÌæ¡£

ϵͳ½øÈëϵͳºó£¬»á³öÏÖÈçϵÄÌáʾ·û

bash£­3.00#ÎÒÃÇÔÚÌáʾ·ûºóÃæÊäÈë

passwd°´ÕÕ¸øÎÒÃǵÄ˵Ã÷£¬ÊäÈëÁ½ÖÁÈý´ÎеÄÃÜÂë¾Í¿ÉÒÔÁË¡£

ÒòΪÏÖÔÚµÄϵͳֻÊǸöºÜСµÄÄÚºËϵͳ£¬ÎÒÃDz»Òª×÷ÈκÎÆäËüµÄ²Ù×÷£¬Ò²²»ÒªÓÃexitÍ˳öshell.Ð޸ĺÃÃÜÂëºó£¬ÎÒÃÇÓÃÈçÏÂÃüÁîÈÃ/Ŀ¼ֻ¶Á

mount -o remount£¬rw /

ÏÖÔھͿÉÒÔ°²È«µÄÖØÆôϵͳÁË¡£

·½·¨¶þʵÏÖ¹ý³Ì

¡¡ÎÒÃÇÓÃslackwareµÄ°²×°¹âÅÌÆô¶¯ÏµÍ³¡£

×¢Ò⣬Èç¹ûÄãÊÇscsiµÄÓ²ÅÌ£¬ÒªÓÃscsi.s²ÎÊýÀ´Æô¶¯ÏµÍ³¡£

ÔÚÓÃroot½øÈëÕâ¸ö¹âÅÌÒýµ¼µÄϵͳºó£¬ÎÒÃǽ«ÎÒÃÇÓ²ÅÌÉÏlinuxµÄ/·ÖÇø¹ÒÔØÉÏÀ´¡£

ÓÃÈçÏÂÃüÁî¹ÒÔØ

mkdir /mnt/root mount /dev/sda1 /mnt/root×¢Ò⣺ÎÒµÄÓ²ÅÌÊÇscsiµÄ£¬/·ÖÇøλÓÚsdaÕâ¸öÉ豸ÉÏ£¬ËùÒÔÎÒÓÃmount /dev/sda1À´¹ÒÔØ/·ÖÇø¡£ÄãµÄÓ²Å̺ͷÖÇøÒ²ÐíºÍÎҵIJ»Ò»Ñù£¬Òª×Ô¼ºÐÞ¸ÄÉÏÃæµÄmountÃüÁî¡£

È»ºóÎÒÃÇÓÃviÀ´±à¼­Ó²ÅÌÉϵÄshadowÎļþ

vi /mnt/root/etc/shadow

ÎÒÃǻῴµ½ÀàËÆÏÂÃæµÄ»­Ãæ



ÎÒÃǽ«µÚÒ»ÐÐÄÚÈÝÐÞ¸ÄÈçÏÂ

root£º£º12941£º0£º£º£º£º£º

Æäʵ¾ÍÊÇ°ÑrootºóÃæµÄµÚÒ»¸öºÍµÚ¶þ¸öðºÅÖ®¼äµÄÄÚÈÝɾµô¡£

È»ºóÎÒÃDZ£´æÍ˳öÓÃrebootÖØÆôϵͳ¾Í¿ÉÒÔÁË¡£

×ܽá

¡¡µÚÒ»ÖÖ·½·¨²»ÓùâÅÌ£¬ºÜÈÝÒס£¶øÇÒ¿ÉÒÔ´ïµ½ÐÞ¸ÄÃÜÂëµÄЧ¹û¡£µ«ÊÇÈç¹ûûÓÐliloµÄÆô¶¯»­Ãæ³öÏÖ£¬¾Í²»Ì«ºÃ°ìÁË¡£

µÚ¶þÖÖ·½·¨ÐèÒªÓõ½¹âÅÌÀ´Æô¶¯ÏµÍ³£¬Ïà¶ÔÒª¸´ÔÓһЩ¡£µ«ÊÇ¿ÉÒÔÔÚûÓÐliloÆô¶¯»­ÃæµÄʱºò£¬×÷ΪһÖÖ²¹³ä¡£²»¹ýµÚ¶þÖÖ·½·¨Ö»Äܼòµ¥µÄÇå¿ÕÃÜÂ룬Ҫ¼ÇµÃÏ´ÎÆô¶¯ºó£¬Òª×Ô¼ºÉèÖÃÃÜÂë¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 0 ÌõÆÀÂÛ