Reset Password if forget username and password Follow
Example: Reset Password
Reference model:
- Switch model name: All
- Edgecore SONiC version: All
Procedure :
Step 1: Reboot system and press “e” to edit SONiC grub option (e.g SONiC-OS-Edgecore-SONiC_20201123_130028_ec202006_74)
Step 2: Add init=/bin/bash as shown below,
+-----------------------------------------------------------------------------+
|setparams 'SONiC-OS-Edgecore-SONiC_20201123_130028_ec202006_74' |
| |
| search --no-floppy --label --set=root SONiC-OS |
| echo 'Loading SONiC-OS OS kernel ...' |
| insmod gzio |
| if [ x = xxen ]; then insmod xzio; insmod lzopio; fi |
| insmod part_msdos |
| insmod ext2 |
| linux /image-Edgecore-SONiC_20201123_130028_ec202006_74/boot/vmli\ |
|nuz-4.19.0-6-2-amd64 root=UUID=3ec4cab4-38b0-473d-a1ef-0a667f144c1e rw cons\ |
|ole=tty0 console=ttyS0,115200n8 init=/bin/bash quiet net.ifnames=0 biosde\ |
|vname=0 loop=image-Edgecore-SONiC_20201123_130028_ec202006_\ |v
|74/fs.squashfs loopfstype=squashfs ap\ |
|parmor=1 security=apparmor varlog_size=4096 usbcore.autosuspend=-1 pcie_asp\ |
|m=off tg3.short_preamble=1 tg3.bcm5718s_reset=1 |
| echo 'Loading SONiC-OS OS initial ramdisk ...' |
| initrd /image-Edgecore-SONiC_20201123_130028_ec202006_74/boot/init\ |
|rd.img-4.19.0-6-2-amd64 |
+-----------------------------------------------------------------------------+
Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
a command-line or ESC to discard edits and return to the GRUB menu.
Note: This insertion will be restored after rebooting. Therefore, it's not necessary to edit grub option again.
Step 3: Press Ctrl+x to boot
Loading SONiC-OS OS kernel ...
Loading SONiC-OS OS initial ramdisk ...
[ 2.708038] irq 16: nobody cared (try booting with the "irqpoll" option)
[ 2.714804] handlers:
[ 2.717210] [<ffffffff94c427b0>] serial8250_interrupt
[ 2.722539] Disabling IRQ #16
[ 3.647833] ixgbe 0000:08:00.1: HW Init failed: -17
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
root@(none):/#
Step 4: Now you're able to modify the password by linux command. Username root as example.
root@(none):/# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Step 5: Reboot the switch by linux command or Power cycle the switch
root@(none):/# reboot -f
Reference: SONiC Github https://github.com/Azure/SONiC/blob/master/doc/SONiC-User-Manual.md#23-how-to-reset-password
Comments
0 comments
Please sign in to leave a comment.