How to enter CentOS without username&password

C

Chester

Guest
Hi, guys. My tutor just gave me a server, which had been installed CentOS. He told me to learn Linux with, but first of all, I should enter it and back up data without username and password!!! Cuz he forgot all of them....... Now I am running this noisy server, there are only 4 items I can choose: Language, Session, Restart or Shut Down. Also, a field to enter user's info. Could you please tell me how to do? (The first thing I wanna do is to backup all data on this server) THANK YOU!!!
 


Guess you'd have to use a live cd, mount an external hard drive and back it up that way?

Easiest way i know of (unless you can use the live cd to wipe or guess/hack the password?)
The live cd can tell you the username because there will be a user directory under the home directory.
 
THANKS!!! I entered the single user mode and changed root's pwd, now my problem is how to mount an external hard drive(NTF). I typed "yum install fuse", but there were only two lines on the terminal: Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile
 
You can boot the OS into single user mode. Once there you can change passwords from the command line. Search google for "boot linux single user mode". It's a simple matter of appending the word "single" to the boot string at boot time.
 
You can boot the OS into single user mode. Once there you can change passwords from the command line. Search google for "boot linux single user mode". It's a simple matter of appending the word "single" to the boot string at boot time.

thank you! I have changed the password as you said.

we can complete the task either by changing root password in run level 1 or disable root password from /etc/passwd file.

*to changing root password go to run level 1 and run command "passwd root" and change the password.
*to disable root password follow these steps
-open [/etc/passwd] file
-remove [x] in second feild and save file.
-reboot
*How to go to run level 1
-In the graphical GRUB boot loader screen, select the Red Hat Enterprise Linux boot label and press [e] to edit it.
-Arrow down to the kernel line and press e to edit it.
-At the prompt, type the number 1 followed by [Quiet splash] and hit [ENTER] key
Press the key to boot the system.

Sorry for this late reply. You gave me a very very helpful answer!
 
Last edited:
Sh*t, Dirk... good one! My mind is going as I age. I knew that and forgot it.

Dang.
 
You can also take the install media and perform a 'linux rescue' and mount the partitions and use chroot to make the mounted directory the root directory and use passwd to change the password also. But that would seem to be more complicated.
 
we can complete the task either by changing root password in run level 1 or disable root password from /etc/passwd file.

*to changing root password go to run level 1 and run command "passwd root" and change the password.
*to disable root password follow these steps
-open [/etc/passwd] file
-remove [x] in second feild and save file.
-reboot
*How to go to run level 1
-In the graphical GRUB boot loader screen, select the Red Hat Enterprise Linux boot label and press [e] to edit it.
-Arrow down to the kernel line and press e to edit it.
-At the prompt, type the number 1 followed by [Quiet splash] and hit [ENTER] key
Press the key to boot the system.
 

Members online


Latest posts

Top