close

reference: http://www.linuxtopia.org/online_books/centos_linux_guides/centos_linux_step_by_step_guide/s1-q-and-a-root-passwd.html

Forgotten root Password

  1. At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.

  2. You are presented with a prompt that looks similar to the following:

    grub append> ro root=LABEL=/
    
  3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

    ro root=LABEL=/ single
    
  4. Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

    sh-2.05b#
    
  5. You can now change the root password by typing

    passwd root
    

    You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 膩撐 的頭像
    膩撐

    哈宅哈宅

    膩撐 發表在 痞客邦 留言(0) 人氣()