- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page