How to enter CentOS without username&password

Discussion in 'General Server' started by Chester, Mar 29, 2013.

  1. Chester

    Chester New Member

    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    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!!!

    DevynCJohnson likes this.
  2. mcneely.mike

    mcneely.mike New Member

    Messages:
    27
    Likes Received:
    6
    Trophy Points:
    0
    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.
    DevynCJohnson and Chester like this.
  3. Chester

    Chester New Member

    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    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
  4. dirk.digalow

    dirk.digalow New Member

    Messages:
    17
    Likes Received:
    9
    Trophy Points:
    3
    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.
  5. Chester

    Chester New Member

    Messages:
    18
    Likes Received:
    3
    Trophy Points:
    3
    thank you! I have changed the password as you said.

    Sorry for this late reply. You gave me a very very helpful answer!
    Last edited: Aug 31, 2013
  6. mcneely.mike

    mcneely.mike New Member

    Messages:
    27
    Likes Received:
    6
    Trophy Points:
    0
    Sh*t, Dirk... good one! My mind is going as I age. I knew that and forgot it.

    Dang.
  7. dirk.digalow

    dirk.digalow New Member

    Messages:
    17
    Likes Received:
    9
    Trophy Points:
    3
    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.
  8. anubhav tiwari

    anubhav tiwari New Member

    Messages:
    11
    Likes Received:
    2
    Trophy Points:
    3
    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.

Share This Page