Reset root password for CentOS

1. Reboot your machine.

2. From the login screen, click 'Reboot'. You will see the shutdown sequence begin.

3. Allow the system to reboot to the GRUB splash screen, (the first graphical appearing screen, blue) and then press "e". Select the line containing "kernel" (up and down arrows), and press "e" again. GRUB will display the line in edit mode.

4. Add "single" to the end of the line, and press return. GRUB will return you to the previous screen.

5. Press "b" to boot the system into what will now be single user mode. The system will come part of the way up, and then drop you into a root shell - the prompt will look like this: sh-2.05# _

Keep an eye for this as it may only pause briefly before moving on to complete the boot.

6. Type "passwd" and press return. The system will ask you for a new password. Type in your new password, then to retype it as confirmation (it will not display on the screen). If the two entries do not match, it will ask you to try again.

7.Once the new password is in place, type "exit" and press return to allow the system to finish booting.

 

The system sets its hostname at bootup based on the HOSTNAME line in /etc/sysconfig/network.You also have to change the name in the /etc/hosts file

 

 

 

Information on the Tufts IT Knowledgebase is intended for IT Professionals at Tufts.
If you have a question about a Tufts IT service or computer/account support, please contact your IT support group.