Chinaunix

标题: JunOS密码恢复 [打印本页]

作者: joiner    时间: 2006-03-18 20:48
标题: JunOS密码恢复
有部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




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2