[ONL]Password recovery for ONL via ONIE. Follow
Purpose:
This application note describes the procedures that how to recover the password on ONL.
Model:
For all x86 models which installed ONL.
Procedure:
STEP1. Login ONIE rescue mode.
a.
b.
STEP2. Check the ONL installed in which partition.
ONIE:/ # blkid
STEP3. Mount the partition which label name is "ONL-DATA"(/dev/sdb7).
ONIE:/ # mkdir /tmp/onl
ONIE:/ # mount -t ext4 /dev/sdb7 /tmp/onl
ONIE:/ # mount
STEP4. Modify the file /etc/shadow. (Remove the string between the first and the second colon)
E.g., root::10978:0:99999:7:::
ONIE:/ # cd /tmp/onl/etc/
ONIE:/tmp/onl/etc # vi shadow
STEP5. Write all buffered blocks to disk
ONIE:/ # sync
STEP6. Unmount the partition and reboot the switch.
ONIE:/ # umount /tmp/onl
ONIE:/ # reboot
STEP7. Boot to ONL. Then, login by user root, no need password with a console port.
localhost login: root
Last login: Sat Jan 22 19:56:35 UTC 2000 on ttyS0
Linux localhost 4.14.109-OpenNetworkLinux #1 SMP Tue Sep 17 10:00:58 UTC 2019 x86_64
Last login: Sat Jan 22 19:56:35 UTC 2000 on ttyS0
Linux localhost 4.14.109-OpenNetworkLinux #1 SMP Tue Sep 17 10:00:58 UTC 2019 x86_64
STEP8. Set your own password.
root@localhost:~# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Comments
0 comments
Please sign in to leave a comment.