Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
IJOS-12a-guide_pdf / IJOS-12.a_LGD (Detailed Lab Guide).pdf
Скачиваний:
379
Добавлен:
11.04.2015
Размер:
1.51 Mб
Скачать

Introduction to the Junos Operating System

STOP

Wait for your instructor before you proceed to the next part.

Part 4: Recovering the Root Password

In this lab part, you will perform root password recovery. The root password recovery process requires that you use the console connection.

Step 4.1

Enter configuration mode and load the lab4-part4-start.config file from the /var/home/lab/ijos/ directory. Commit your configuration and return to operational mode when complete.

lab@srxA-1> configure Entering configuration mode

[edit]

lab@srxA-1# load override ijos/lab4-part4-start.config load complete

[edit]

lab@srxA-1# commit and-quit commit complete

Exiting configuration mode

lab@srxA-1>

Step 4.2

Using a terminal session connected to the console port, reboot the system. Enter yes to authorize the reboot. When prompted to enter the command prompt, press the space bar.

lab@srxA-1> request system reboot

Reboot the system ? [yes,no] (no) yes

Shutdown NOW! [pid 950]

lab@srxA-1>

*** FINAL System shutdown message from lab@srxA-1 ***

System going down IMMEDIATELY

...TRIMMED...

FreeBSD/MIPS U-Boot bootstrap loader, Revision 1.9 (builder@zigeth.juniper.net, Mon May 17 05:45:58 UTC 2010) Memory: 1024MB

[0]Booting from nand-flash slice 1 Un-Protected 1 sectors

writing to flash...

Protected 1 sectors

Loading /boot/defaults/loader.conf

/kernel data=0xa17310+0xdbc54 syms=[0x4+0x7f730+0x4+0xb6cd4]

Lab 4–20 • Operational Monitoring and Maintenance (Detailed)

www.juniper.net

Introduction to the Junos Operating System

Hit [Enter] to boot immediately, or space bar for command prompt.

Booting [/kernel] in 1 second...

Type '?' for a list of commands, 'help' for more detailed help. loader>

Step 4.3

At the prompt, first disable the watchdog process by using the watchdog disable command. Secondly, type boot -s and press Enter to boot the Junos OS in single-user mode.

loader> watchdog disable loader> boot -s

Kernel entry at 0x801000d8 ...

init regular console

Primary ICache: Sets 64 Size 128 Asso 4

Primary DCache: Sets 1 Size 128 Asso 64 Secondary DCache: Sets 512 Size 128 Asso 8

...TRIMMED...

System watchdog timer disabled

Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh:

Step 4.4

When prompted to enter a pathname for shell or ‘recovery’ for root password recovery, type recovery and press Enter.

Enter full pathname of shell or 'recovery' for root password recovery or RETURN for /bin/sh: recovery

Performing system setup ...

...TRIMMED...

Performing initialization of management services ...

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@srxA-1>

www.juniper.net

Operational Monitoring and Maintenance (Detailed) • Lab 4–21

Introduction to the Junos Operating System

Step 4.5

Once the prompt is available, enter configuration mode and set a new root password of lab123. Commit the configuration and return to configuration mode. Use the exit command to leave operational mode, the software prompts you about rebooting. Type y and press Enter to reboot the system.

root@srxA-1> configure Entering configuration mode

[edit]

root@srxA-1# set system root-authentication plain-text-password

New password:

Retype new password:

[edit]

lab@srxA-1# commit and-quit commit complete

Exiting configuration mode

lab@srxA-1> exit

 

 

 

Reboot the system? [y/n]

y

 

Waiting (max 60

seconds)

for system process

`vnlru' to stop...done

Waiting (max 60

seconds)

for system process

`bufdaemon' to stop...done

Waiting (max 60

seconds)

for system process

`syncer' to stop...

Syncing disks, vnodes remaining...1 1 1 1 0

0 done

syncing disks... All buffers synced.

Uptime: 11m53s

Rebooting...

...TRIMMED...

Thu Oct 21 08:46:40 PDT 2010

srxA-1 (ttyu0)

login:

Step 4.6

Once the system boots, verify the root password recovery by logging in with the new root password.

srxA-1 (ttyu0)

login: root Password:

--- JUNOS 12.1R1.9 built 2012-03-24 12:12:49 UTC

root@srxA-1%

Lab 4–22 • Operational Monitoring and Maintenance (Detailed)

www.juniper.net

Introduction to the Junos Operating System

Question: Were you successfully authenticated using the new root password?

Answer: You should now be successfully authenticated as root using the new root password. This successful authentication verifies that the access recovery process worked.

Step 4.7

Start the CLI and enter configuration mode.

root@srxA-1% cli root@srxA-1> configure Entering configuration mode

[edit] root@srxA-1#

Step 4.8

Restore the lab4-part4-start configuration using the load override / var/home/lab/ijos/lab4-part4-start.config command. Activate the configuration and log out of the system.

[edit]

root@srxA-1# load override /var/home/lab/ijos/lab4-part4-start.config load complete

[edit]

root@srxA-1# commit and-quit commit complete

Exiting configuration mode

root@srxA-1> exit

root@srxA-1% exit logout

srxA-1 (ttyu0)

login:

STOP

Tell your instructor that you have completed Lab 4.

www.juniper.net

Operational Monitoring and Maintenance (Detailed) • Lab 4–23

Introduction to the Junos Operating System

Lab 4–24 • Operational Monitoring and Maintenance (Detailed)

www.juniper.net