Here's how to recover your OS10 linuxadmin and admin passwords. If you know your linuxadmin password, follow our shorter video 'OS10 Admin Password Reset'. This method requires a console connection to the switch. Schedule a maintenance window, if needed, as the switch will be rebooted several times.
Connect to the console port with the settings shown, then reboot by power cycling the switch. Press 'E' when the GRUB menu appears. For OS version 10.5.2 and newer, move the cursor to the end of the line 'set os_debug_args=' and add 'init=/bin/bash' between the quotation marks For older versions add it to the end of the section beginning 'linux' Then press Control and X to reboot the switch.
It'll now boot into the root shell, with no password set. Grep for 'linuxadmin' in the password file. If '/bin/bash' as shown here is not present, run the usermod command to reset it. Here, it will return 'no changes'. Check if the linuxadmin account is locked. 'L' is locked, 'P' is unlocked If it's locked, unlock it, and confirm it's been successful. Set a temporary Linuxadmin password.
This will only work for one login. You'll have to change it again later. Run sync, then reboot the switch Login as 'linuxadmin' with your temporary password. We can now recover the admin account. Run 'sudo -i', and enter your linuxadmin password to run as root.
Grep for 'admin' in the password file, If the path as shown here is not present, run the usermod command shown to reset it. Here, it will return 'no changes'. Check if the admin account is locked. Again, 'L' is locked, 'P' is unlocked If it's locked, unlock it, and confirm it's been successful.
Set a temporary Admin password. Again, this will only work for one login. Run 'sync', then 'exit' twice to logout Login as 'admin' with your temporary password. We can now set our actual passwords for both accounts. Enter configuration mode Optionally, you can disable checks for password length and complexity.
Set the password for the admin account, then the linuxadmin account Exit config, and 'write memory' to save your changes. These passwords will now persist across logins and reboots.
Thanks for watching.