RE: Rest Root Password

Discussion in 'General' started by elaps, Dec 28, 2008.

  1. elaps

    Joined:
    Aug 19, 2008
    Messages:
    13
    Likes Received:
    0
    Somehow I screwed up and changed the root password. How can I change it without having to reinstall the whole system.
     
  2. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    I think that, with the single user mode, but maybe another solution.
    Make an new installation (VMWare, or hard), so root and password.
    Mount your HDD (root account lost) from your new install.
    copy 2 files:
    /etc/passwd
    /etc/shadow
    or
    Modify only the root's line on every file with the good line from the new install.
     
  3. fdiogo

    Joined:
    Sep 7, 2008
    Messages:
    52
    Likes Received:
    0
    if you have acess to console you only need to run "passwd" and enter the new password for root....

    Diogo
     
  4. danardf

    Joined:
    Dec 3, 2007
    Messages:
    8,069
    Likes Received:
    12
    Yes only on single user.
    I don't know how .... on the old unix, on starting boot kernel, make a CTRL + d, and the kernel start on single user mode (root by default), and into this mode, you could make passwd command. Now, I don't know if is the same thing! :huh:
     

Share This Page