Vindieselwalker Posted April 9, 2019 Posted April 9, 2019 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.!!
windysea Posted April 9, 2019 Posted April 9, 2019 Presuming this is not a brand-new install, correct? How are you able to edit /etc/shadow? If you are already logged in as root you can just use 'passwd' to change the passwd. When running as root you do not need to provide the existing password to change a password. If you can login as a user with 'sudo' access, you can use 'sudo -i' to gain a root shell then follow the step above. If you have mounted your SD card on another linux instance, you should be able to use: passwd -R <path_to_mount_point> root <path_to_mount_point> is where you have your SD card mounted (not the full path to the passwd/shadow files) 1
Recommended Posts