• sdk
  • arm-sdk
  • Issues
  • #24

Closed
Open
Opened 2017-08-11T16:11Z by Luzemario @luzemario

[Cubietruck Devuan 1] "Passwd" bug deletes users from /etc/shadow file

Steps to reproduce:

  1. Install Cubietruck image and sunxi blob as stated in README;
  2. Log in to devuan;
  3. Issue a "passwd" command to change root password;
  4. Add an ordinary user. Define his/her password;
  5. PAM says an authentication failure;
  6. Both root and the new user are removed from "shadow" file;
  7. The system becomes unusable because is not possible to login anymore.

Please solve the reCAPTCHA

We want to be sure it is you, please confirm you are not a robot.

  • Luzemario
    Luzemario @luzemario · 2017-08-11T16:01Z

    It has to do with date settings:

    Jul  5 05:18:08 devuan login[1114]: FAILED LOGIN (1) on '/dev/ttyS0' FOR 'root', Authentication failure
    Jul  5 05:18:14 devuan login[1114]: pam_unix(login:auth): check pass; user unknown
    Jul  5 05:18:14 devuan login[1114]: pam_unix(login:auth): authentication failure; logname=LOGIN uid=0 euid=0 tty=/dev/ttyS0 ruser= rhost= 
    Jul  5 05:18:17 devuan login[1114]: FAILED LOGIN (2) on '/dev/ttyS0' FOR 'UNKNOWN', Authentication failure
    Jul  5 05:18:25 devuan login[1114]: FAILED LOGIN (3) on '/dev/ttyS0' FOR 'root', Authentication failure
    Jul  6 09:03:15 devuan sshd[1080]: Server listening on 0.0.0.0 port 22.
    Jul  6 09:03:15 devuan sshd[1080]: Server listening on :: port 22.
    Jul  6 09:17:01 devuan CRON[1126]: pam_unix(cron:account): account root has password changed in future

    So adjusting the date to the correct time and changing root password one more time solved the issue.

    Cubietruck has a hardware battery-backed RTC, but the battery is of low capacity, so clock issues are seen often. One wants to remember to double check the time settings before changing root password, or he/she will be locked outside. Adjust the time, issue ahwclock --systohcand only after this change the root password.

    If you got locked out and have another distro installed on flash, boot into flash then mount the card somewhere, then issue achroot <where_the_card_is_mounted>. Verify the time/date settings then change the root password. Reboot into card again and you're done.

    Edited by Luzemario 2017-08-11T16:04Z
  • Luzemario @luzemario closed · 2017-08-11T16:01Z

    closed