1 Reply Latest reply on May 16, 2016 1:01 PM by Intel Corporation

    How to remove/reset root password

    Amit.Amrutkar88@gmail.com

      Hi,

       

      After booting intel Edison board, go to root and it asks for a password.

      I want to remove or reset this password.

       

      Please find attached snap for reference.

       

      Please assist.

       

      Thanks in advance,

      Amit Amrutkar

        • 1. Re: How to remove/reset root password
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi Amit,

          You would have to modify the file /etc/shadow. Follow the steps below to delete the root password:

          1. Run the command: cat /etc/shadow | grep root
          2. Copy the output from the command above. This is the information of your root account. You will see something like root:sdfhowe934rbwg23:11111:0:99999:7:::. What it's important here is the string located between the first two colon marks. This is your current password which is encrypted. If you want to remove it, you have to delete that string.
          3. Run the following command to remove the password: sed -i "1s/.*/[root::.....]/" /etc/shadow

          Note the brackets in the command above. You will have to copy the same output you got previously but without the string that corresponds to the encrypted password. If your original output was for example: root:sdfhowe934rbwg23:11111:0:99999:7:::, then you have to use the following string: root::11111:0:99999:7:::, so the command should look like sed -i "1s/.*/root::11111:0:99999:7:::/" /etc/shadow

          Then, if you run the following command again, the password shouldn't be there: cat /etc/shadow | grep root. If so, reboot the board. The next time you try to access the console, you shouldn't have to enter a password.

          Regards,
          Diego