📄 -
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0059)http://www.eschool.com.cn/documents/kfzyd/linux1/0019.shtml -->
<!-- eschool_资格认证_linux1 --><HTML><HEAD><TITLE>忘记Linux密码怎么办</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content=eschool name=channel>
<META content=忘记Linux密码怎么办 name=title>
<META content="100/01/17 18:9:0" name=time>
<META content="" name=cata>
<META content=linux1 name=subcata>
<META content=,,, name=Keywords><LINK href="忘记Linux密码怎么办.files/eschool.css"
rel=stylesheet>
<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR bgColor=#ff7b1a>
<TD height=22 width=10> </TD>
<TD class=top width=500><A href="http://home.enet.com.cn/index.shtml"><IMG
align=absMiddle border=0 height=14 src="忘记Linux密码怎么办.files/c_home.gif"
width=14></A> <A class=nav1
href="http://home.enet.com.cn/index.shtml">首页</A> | <A class=nav1
href="http://www.enews.com.cn/index.shtml">新闻</A> | <A class=nav1
href="http://www.esoftware.com.cn/index.shtml">下载</A> | <A class=nav1
href="http://www.egames.com.cn/index.shtml">游戏</A> | <A class=nav1
href="http://www.eschool.com.cn/index.shtml">学院</A> | <A class=nav1
href="http://www.eclub.com.cn/">社区</A></TD>
<TD class=top width=80><A href="http://www.eshop.com.cn/"><IMG
align=absMiddle border=0 height=14 src="忘记Linux密码怎么办.files/c_cart.gif"
width=17></A> <A class=nav1 href="http://www.eshop.com.cn/">硅谷商城</A></TD>
<TD class=top width=80><A href="http://www.eproduct.com.cn/"><IMG
align=absMiddle border=0 height=14 src="忘记Linux密码怎么办.files/c_product.gif"
width=17></A> <A class=nav1 href="http://www.eproduct.com.cn/">产品大全</A></TD>
<TD class=top width=80><A href="http://www.estore.com.cn/"><IMG
align=absMiddle border=0 height=14 src="忘记Linux密码怎么办.files/c_gift.gif"
width=15></A> <A class=nav1
href="http://www.estore.com.cn/">网店管理</A></TD></TR></TBODY></TABLE><!--eNet导航:结束--><!--eNet Logo:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR>
<TD colSpan=3 height=1><SPACER height="1" type="block"></TD></TR>
<TR>
<TD align=middle bgColor=#e5e5e5 height=77 width=200><IMG
alt="eNet 硅谷动力 中国IT商业门户" height=60 src="忘记Linux密码怎么办.files/c_elogo.gif"
width=180></TD>
<TD bgColor=#094295 width=36><IMG height=77
src="忘记Linux密码怎么办.files/c_h1.gif" width=36></TD>
<TD align=middle bgColor=#094295 width=514><!-- here is ad begin--><IFRAME
frameBorder=0 height=60 marginHeight=0 marginWidth=0 scrolling=no
src="忘记Linux密码怎么办.files/adjuggler.htm"
width=468>
<script type="text/javascript" language=JavaScript src="http://ad2.enet.com.cn/cgi-bin/adjuggler?Pool=eware&ajtype=jscript"></script>
</IFRAME><!-- here is ad end--></TD></TR>
<TR>
<TD colSpan=3 height=1><SPACER height="1"
type="block"></TD></TR></TBODY></TABLE><!--eNet Logo:结束--><!--二级导航:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR bgColor=#737373>
<TD class=top height=22 width=210><A
href="http://www.eschool.com.cn/index.shtml"><IMG alt="学院 eSchool.com.cn"
border=0 height=22 src="忘记Linux密码怎么办.files/c_eschool_logo.gif"
width=210></A></TD>
<TD align=middle class=top height=22 width=440><A class=nav2
href="http://www.eschool.com.cn/index_tyzhish.shtml">通用知识</A> <FONT
color=#ff7b1a>|</FONT> <A class=nav2
href="http://www.eschool.com.cn/index_chxukf.shtml">程序员开发</A> <FONT
color=#ff7b1a>|</FONT> <A class=nav2
href="http://www.eschool.com.cn/zgrz/index_zgrzh.shtml">微软认证</A> <FONT
color=#ff7b1a>|</FONT> <A class=nav2
href="http://www.eschool.com.cn/djks/index_djksh.shtml">等级考试</A> <FONT
color=#ff7b1a>|</FONT> <A class=nav2
href="http://www.eschool.com.cn/zgrz/eschool_test.shtml">模拟考场</A> </TD>
<TD class=top width=100><A class=nav2
href="mailto:eschool@enet.com.cn">学院信箱</A> <FONT
color=#ff7b1a>>>></FONT></TD></TR></TBODY></TABLE><!--二级导航:结束-->
<TABLE align=center bgColor=#e5e5e5 border=0 cellPadding=0 cellSpacing=0
width=750>
<TBODY>
<TR>
<TD><!--头部搜索:开始-->
<TABLE align=center bgColor=#e5e5e5 border=0 cellPadding=0 cellSpacing=0
width=750>
<FORM action=http://www.esearch.com.cn/baidu method=get>
<TBODY>
<TR>
<TD align=right width=120><INPUT name=word size=12></TD>
<TD align=middle width=130><SELECT name=si> <OPTION selected
value=eNet/it>其它IT站点</OPTION> <OPTION value=gi>所有网页</OPTION>
<OPTION value=eNet/all>eNet</OPTION></SELECT></TD>
<TD width=70><INPUT name=ct type=hidden value=0> <INPUT name=cl
type=hidden value=2> <INPUT name=lm type=hidden value=0> <INPUT
name=tn type=hidden value=enet> <INPUT alt=搜索 border=0 cache
height=20 src="忘记Linux密码怎么办.files/search.gif" type=image
width=42></TD>
<TD align=middle width=60><A
href="http://www.esearch.com.cn/">高级搜索</A></TD>
<TD align=middle width=269>热门字: <A
href="http://www.esearch.com.cn/baidu?word=asp&si=gi&ct=0&cl=2&lm=0&tn=enet">asp</A>
<A
href="http://www.esearch.com.cn/baidu?word=javascript&si=gi&ct=0&cl=2&lm=0&tn=enet">javascript</A>
<A
href="http://www.esearch.com.cn/baidu?word=php&si=gi&ct=0&cl=2&lm=0&tn=enet">php</A>
</TD></TR></FORM></TBODY></TABLE><!--头部搜索:结束--></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR>
<TD bgColor=#ffffb0 class=p11 vAlign=top width=144>
<DIV align=center>
<P><BR><BR>
<P><B><FONT color=#000000>Linux专区</FONT></B><BR>
<HR SIZE=1 width="90%">
<TABLE align=center border=1 borderColorDark=#ffffff
borderColorLight=#333333 cellPadding=3 cellSpacing=0 width="90%">
<TBODY>
<TR bgColor=#edeef3>
<TD class=p9w>
<P align=center><FONT color=#000000><A
href="http://www.eschool.com.cn/Linux/index_linux.shtml"
target=_blank>Linux专区</A></FONT></P></TD></TR>
<TR bgColor=#edeef3>
<TD class=p9w><A
href="http://www.eschool.com.cn/Linux/index_linuxwzh.shtml"
target=_blank>技术文章</A><BR><A
href="http://www.eschool.com.cn/Linux/index_linux.shtml"
target=_blank>系统教程</A> </TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width=631>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD></TD></TR></TBODY></TABLE>
<TABLE align=center border=0 width="90%">
<TBODY>
<TR>
<TD class=p9w colSpan=2 vAlign=top width="100%">
<H2><!--imagehere--></H2>
<P align=center><B>忘记Linux密码怎么办</B></P>
<P align=center><B><A href="http://www.turbolinux.com.cn/"
target=_blank>TurboLinu</A>x博士厅版主 whm</B>
</P> 如果忘记了Linux密码,这时有两种情况,一种是用LILO管理器来启动的,另一种是不通过LILO启动的。如果你的系统是通过LILO管理器来启动的,可在LILO启动提示符LILO
boot:后输入Linux
single,而后回车启动Linux系统进入单用户模式,这时,就可以用passwd命令来修改你的密码了,修改完后重新启动系统,就可以使用新的密码了。以上方法在中文Turbo
Linux 3.0.2下通过,但在Slackware
Linux下不能通过。如果是第二种情况,修改密码就麻烦一些。Linux的技术资料介绍和目前有关媒体发表的文章,都说在这种情况下必须从新安装Linux系统。经过笔者的反复摸索,发现用以下方法可以清除Linux的密码:用Linux
boot软盘启动,当出现LILO boot:提示符时,输入linux
mount=/dev/xxxx,其中xxxx为Linux所在的分区,IDE硬盘的设备名为hda,第一分区为hda1,如果你的系统有两个IDE硬盘,第二个为hdb;如果你使用的是SCSI硬盘,则硬盘的设备名为sda。正确输入硬盘的设备及分区号后启动Linux,系统自动将Linux的分区mount到/mnt下,这时,只要进入到/mnt/etc下,用vi命令将passwd文件中root行中的密码去掉,重新引导系统后,在超级用户下执行passwd命令,重新生成一个密码即?
<BR>伞>咛逍薷奈恢萌缦拢? <BR><BR> root:SDFTYUIIOO34G
:0:0root:/root:/bin/bash
<BR><BR> 将带下划线部分的内容删掉后存盘,即可使系统没有密码。如果你的系统拥有passwd和shadow两个文件,需要修改的密码文件则是/etc下的shadow,它是passwd的一个映象,是真正存放密码的文件。
<BR><BR> 如果你的Linux系统是其它版本,不能识别linux
mount=/dev/xxxx,也可使用以下通用方法解决:目前各个版本的Linux都随盘发行有应急引导盘,一般有两张,一张是boot盘,另一张是root盘,这两张盘的命名,各个版本基本都差不多,前面几个字符是rescxxxx,后缀是img或gz。我所见到的是:rescboot.img、rescroot.img。找到这两张盘后,使用随盘发行的IMG文件写盘命令rawrite.exe将rescboot.img、rescroot.img两个文件分别写入两张软盘,而后用这两张软盘将Linux引导起来。引导起来后,在超级用户下执行:mount/dev/xxxx/mnt(xxxx的解释同上述)
<BR><BR> #cd/mnt <BR><BR> vi/mnt/etc/passwd
<BR><BR> 将超级用户密码删除,删除方法同上。如果你的系统同时拥有passwd和shadow两个文件,仅修改shadow一个文件即可解决问题。以下是shadow密码文件root行的实际情况:root:Aan3DFTUYOEMF3
:9804:0::::: <BR><BR> 用vi修改时,只须将带下划线部分删除掉即可删除密码。 <BR>
<P align=right class=p9>100/01/17
18:9:0</P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><!--底部banner:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=750>
<TBODY>
<TR>
<TD align=middle height=80><!-- here is add begin--><IFRAME frameBorder=0
height=60 marginHeight=0 marginWidth=0 noResize scrolling=no
src="E:\os\rtos\技巧\忘记Linux密码怎么办.files\adjuggler(1).htm"
width=468>
<script language=JavaScript src=http://ad2.enet.com.cn/cgi-bin/adjuggler?Pool=bottom&ajtype=jscript></script>
</IFRAME><NOSCRIPT><A
href="http://ad2.enet.com.cn/cgi-bin/adjuggler?ajtype=cgi_click&ajkey=bottom"
target=_blank><IMG border=0 height=60 src="忘记Linux密码怎么办.files/egames.gif"
width=468></A></NOSCRIPT> <!-- here is add end--></TD></TR>
<TR>
<TD bgColor=#ff0000 height=2><SPACER height="1"
type="block"></TD></TR></TBODY></TABLE><!--底部banner:结束--><!--Copyright:开始-->
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width=380>
<TBODY>
<TR>
<TD height=8></TD></TR>
<TR align=middle>
<TD><A class=bottom
href="http://home.enet.com.cn/guanyuenet.shtml">关于eNet</A> | <A
class=bottom href="http://home.enet.com.cn/ad_price.shtml">联系广告</A> | <A
class=bottom href="http://home.enet.com.cn/zhaopin_1.shtml">诚邀加盟</A> | <A
class=bottom href="http://home.enet.com.cn/reg.shtml">用户注册</A> | <A
class=bottom href="mailto:webmaster@enet.com.cn">用户反馈</A> | <A
class=bottom href="http://home.enet.com.cn/link.shtml">友情链接</A> </TD></TR>
<TR>
<TD height=8></TD></TR>
<TR>
<TD align=middle class=bottom>联系: <A class=bottom
href="mailto:webmaster@enet.com.cn">webmaster@enet.com.cn</A> 电话:
86-10-65385588 <BR>Copyright© 2000 硅谷动力网络技术有限公司 版权所有
</TD></TR></TBODY></TABLE><!--Copyright:结束--></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -