Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed CentOS 5 OS and didn't setup any user password during the installation, but when I boot the machine, it's prompting for a login from a username/password.

I know that the default username is root; but does anyone know what the password is?


migration rejected from Oct 25 '12 at 12:52

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as not a real question by HopelessN00b, Michael Hampton, Shane Madden, Magellan, Brent Pabst Oct 25 '12 at 12:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

I'm pretty sure that the normal install process requires you to type in a root password. There is no 'default'. Since you can't login at all, you haven't customized the machine yet or populated it with data, maybe you should try the install process again and look for the screen that is prompting you to type in the root password.


Some default root passwords I've encountered in the past:

  • "root"
  • "toor"
  • "" (no password)

Googling CentOS root password gets me this, which has the LiveCD password as "12qwaszx". If you installed using the LiveCD, then that may be it.

Edit 2: the editing - Finally, this document on CentOS 5 Installation indicates you can't have installed without setting a root password, so are you sure you didn't just forget? Try some of your commonly used passwords.

If all else fails, you can try to follow these instructions on resetting a forgotten root password.


This is how you reset the password:

Reboot the machine:

From the console CTRL-ALT-DEL

If you've got GDM or a GUI installed, there's an option there to reboot. If not, CTRL-ALT-F1 to switch to a console VT and then do a CTRL-ALT-DEL as above.

Presumably you're using grub, so when the grub bootloader comes up, press any key to enter the bootloader. The default kernel should be the first in the list, so press to append something to that particular kernel entry.

Go to the end of the line and add '1' or 'single' to that entry. Make sure to leave a space between that and the previous word. Then press to exit that particular mode and 'b' should boot you up again.

You should be dropped into a root prompt. You can change the password by remounting / as read-write (as by default it'll be read-only) & running passwd

# mount -o rw /
# passwd root
# mount -o ro /

Reboot the machine again and your new root password is the password you set in single user mode.

Note: I don't think it's possible to go through the installation process without setting a password without some kind of custom kickstart script.


Start the quemu guest,then

  1. On the GRUB menu, press e.
  2. Select the second line, press e
  3. Append -s after a space
  4. Press Enter then b
  5. Right click on quemu guest and open console,then type sh-3.2#passwd root
  6. Change the password and type init 6 to reboot

If your system was installed using a kickstart file the root password will be specified with the rootpw option.


protected by Mark Henderson Aug 7 '12 at 6:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?