免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1661 | 回复: 0
打印 上一主题 下一主题

JunOS密码恢复 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-03-18 20:48 |只看该作者 |倒序浏览
有部Olive以前设嘅root唔记得咗,于是做咗一次密码恢复。

1、开机,启动到呢个画面时:
FreeBSD/i386 bootstrap loader, Revision 0.8
(
builder@oolong.juniper.net
, Tue Jun 17 01:31:38 GMT 2003)
Loading /boot/defaults/loader.conf
/kernel text=0x328787 data=0x26cb0+0x49fd0 syms=[0x4+0x3abc0+0x4+0x45468]
                    Loader Quick Help
                    -----------------
The boot order is PCMCIA or floppy -> Flash -> Disk -> Lan ->
back to PCMCIA or floppy. Typing reboot from the command prompt will
cycle through the boot devices. On some models, you can set the next
boot device using the nextboot command: nextboot compact-flash | disk
For more information, use the help command: help   
Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [kernel] in 9 seconds...
2、按空格进入ok模式,然后boot -s以单用户模式引导:
For more information, use the help command: help   
Hit [Enter] to boot immediately, or space bar for command prompt.
Booting [kernel] in 9 seconds...
Type '?' for a list of commands, 'help' for more detailed help.
ok boot -s

3、引导到如下画面时,输入“/usr/libexec/ui/recovery-mode”作为shell:
Mounting root from ufs:/dev/ad0s1a
WARNING: / was not properly dismounted
Mounted jbase package on /dev/vn0...
System watchdog timer disabled
Mar 19 07:45:11 init: /etc/spwd.db: No such file or directory
Enter full pathname of shell or RETURN for /bin/sh: /usr/libexec/ui/recovery-mode
NOTE: to go to multi-user operation, exit the single-user shell (with ^D)

4、进入recovery-mode:
Performing checkout of management services ...
NOTE: Once in the CLI, you will need to enter configuration mode using
NOTE: the 'configure' command to make any required changes. For example,
NOTE: to reset the root password, type:
NOTE:    configure
NOTE:    set system root-authentication plain-text-password
NOTE:    (enter the new password when asked)
NOTE:    commit
NOTE:    exit
NOTE:    exit
NOTE: When you exit the CLI, you will be asked if you want to reboot
NOTE: the system
Starting CLI ...
root>

5、咁样就可以为所欲为啦,哈哈,删除原来嘅密码,重启。
root> configure
Entering configuration mode
[edit]
root# delete system root-authentication
[edit]
root# commit
commit complete
[edit]
[email=root@RT01-J-LAB]root@RT01-J-LAB[/email]
# exit
Exiting configuration mode
[email=root@RT01-J-LAB]root@RT01-J-LAB[/email]
> exit
Reboot the system? [y/n] y
Waiting (max 60 seconds) for system process `bufdaemon' to stop...stopped
Waiting (max 60 seconds) for system process `syncer' to stop...stopped



本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/5101/showart_87410.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP