SaiHou Posted August 27, 2018 Posted August 27, 2018 I have 1 Armbian installed in the SBC. I want to login but I don't have any idea what is the root password. I saw there are few methods of breaking it and can bypass / reset password. I noticed that this method is 1 of the easiest way, but it doesn't work. By editing /etc/shadow, root:$6$6fRIGsIb$dt.U84pEFgqpCSmlU9Nn2SLxBK8mYxxZMethrY35kqPg09aS/8e5xQ08excoGzdta6E5XmF2iFQC5J4EJVuM31:17401:0:99999:7::: daemon:*:17326:0:99999:7::: bin:*:17326:0:99999:7::: sys:*:17326:0:99999:7::: sync:*:17326:0:99999:7::: games:*:17326:0:99999:7::: man:*:17326:0:99999:7::: lp:*:17326:0:99999:7::: mail:*:17326:0:99999:7::: news:*:17326:0:99999:7::: uucp:*:17326:0:99999:7::: proxy:*:17326:0:99999:7::: www-data:*:17326:0:99999:7::: backup:*:17326:0:99999:7::: list:*:17326:0:99999:7::: irc:*:17326:0:99999:7::: gnats:*:17326:0:99999:7::: nobody:*:17326:0:99999:7::: systemd-timesync:*:17326:0:99999:7::: systemd-network:*:17326:0:99999:7::: systemd-resolve:*:17326:0:99999:7::: systemd-bus-proxy:*:17326:0:99999:7::: messagebus:*:17326:0:99999:7::: ntp:*:17326:0:99999:7::: avahi-autoipd:*:17326:0:99999:7::: sshd:*:17326:0:99999:7::: rbcs:$6$SMHou.Qx$ZFNh7PSANkFtf7LtUnkBlMZNzoPw5Yj8VHhvpwcpbyvTI4AqIN.NEpWL2uSDI1dVuJLZrh2WS05yyPhHalwRI/:17401:0:99999:7::: gpsd:*:17401:0:99999:7::: Which segment to be removed? root:$6$6fRIGsIb$dt.U84pEFgqpCSmlU9Nn2SLxBK8mYxxZMethrY35kqPg09aS/8e5xQ08excoGzdta6E5XmF2iFQC5J4EJVuM31:17401:0:99999:7::: I tried many times by removing "$6$6fRIGsIb$dt.U84pEFgqpCSmlU9Nn2SLxBK8mYxxZMethrY35kqPg09aS/8e5xQ08excoGzdta6E5XmF2iFQC5J4EJVuM31" and with left with the new line of:- root::17401:0:99999:7::: <---- Is this correct or I am done something very wrong. Please advise and thank you in advance. Regards.
martinayotte Posted August 27, 2018 Posted August 27, 2018 You've done it right, but passwd can NOT be left empty as describe in "man shadow" : Quote This field may be empty, in which case no passwords are required to authenticate as the specified login name. However, some applications which read the /etc/shadow file may decide not to permit any access at all if the password field is empty. So, if you have another board with a known working password, copy the encrypted passwd from one board to the other, it should work.
SaiHou Posted August 27, 2018 Author Posted August 27, 2018 1 hour ago, martinayotte said: You've done it right, but passwd can NOT be left empty as describe in "man shadow" : So, if you have another board with a known working password, copy the encrypted passwd from one board to the other, it should work. Hi martinayotte, Thanks for the reply. Great info. Best regards.
spicedreams Posted August 31, 2018 Posted August 31, 2018 On 8/28/2018 at 12:46 AM, martinayotte said: You've done it right, but passwd can NOT be left empty as describe in "man shadow" : Will removing the password hash result in it being replaced with the hash of the default password? funny story, i created two files in /etc/sudoers.d and mistakenly left the alias the same. now I can't sudo anything to fix it!!
Recommended Posts