Linux ‘Give root password for maintenance’ Lost Password

In the event your Linux box experiences disk or file system issues you may receive a “Give root password for maintenance” prompt upon reboot. If you have your root password you can login but in the event your using ‘slide’ or ‘sudo’ for wheel access or you’ve just mis-placed your root password – you’ll need to reset it.

To reset your root password:

1. When the GRUB loader shows during boot press the spare bar to pause boot.

2. Select your boot kernel.

3. Type ‘e’ to edit the default kernel line.

4. Type ‘e’ again on the line that starts with ‘kernel’.

5. Add ‘init=/bin/bash’ to the end of the ‘kernel’ line then press enter.

6. Type ‘b’ to boot the modified kernel parameters. Continue reading “Linux ‘Give root password for maintenance’ Lost Password”

Lost MySQL Password

If you have accidentally lost or mis-placed your MySQL password, you may reset it as follows:

1. Login to your server as root.

2. Stop MySQL: /etc/init.d/mysqld stop

3. Start MySQL in SafeMode: /usr/bin/mysqld_safe –skip-grant-tables &

4. Connect to MySQL: mysql -h localhost

5. Select the MySQL management database: use mysql;

6. Update the MySQL password: update user set password = password(‘newpassword’) where user = ‘root’ and host=’localhost’;

Note: Change newpassword to your new password.

7. Exit MySQL: quit

8. Stop MySQL in safe mode by running: ps -aux | grep mysql, stop the MySQL service using: kill <service ID>

9. Restart MySQL: /etc/init.d/mysqld start

10. Login to your MySQL instance using your new password: mysql -uroot -p, done!

Lost Dell DRAC Password

If you’ve lost (or miss-placed) the password for a Dell Remote Access Card (DRAC) in a Dell PowerEdge server, you can follow this process to reset the password on the local server.

DRAC 4 Card

1. Check the administrator ID , note that on the DRAC 4, the first index slot is “root” by default.

$racadm getconfig -g cfgUserAdmin -i 1

2. Reset the administrator password:

$racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 1 “newpasswordhere“

DRAC 5 Card

1. Check the administrator account, note that the DRAC 5 index 1 is “Administrator”, index 2 is “root”.

$racadm getconfig -g cfgUserAdmin -i 2

2. Reset the administrator password:

$racadm config -g cfgUserAdmin -o cfgUserAdminPassword -i 2 “newpasswordhere“

This process will work in Windows or Linux, using the command line.