The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Oops, password shadow nuked, Any possible fix?

    Discussion in 'Linux Compatibility and Software' started by Mr.Koala, Sep 1, 2014.

  1. Mr.Koala

    Mr.Koala Notebook Virtuoso

    Reputations:
    568
    Messages:
    2,307
    Likes Received:
    566
    Trophy Points:
    131
    So while merging lingering pacnew files my late nigh sleepy mind did something really silly and the shadow was reset.

    Code:
    /etc/shadow
    
    root:************************************::::::
    bin:x:14871::::::
    daemon:x:14871::::::
    mail:x:14871::::::
    ftp:x:14871::::::
    http:x:14871::::::
    uuidd:x:14871::::::
    dbus:x:14871::::::
    nobody:x:14871::::::
    systemd-journal-gateway:x:14871::::::
    systemd-timesync:x:14871::::::
    systemd-network:x:14871::::::
    systemd-bus-proxy:x:14871::::::
    systemd-resolve:x:14871::::::
    ******:************************************::::::
    smiley-embarrassed.png

    The root and admin user passwords are easy to fix as I do remember them in plain text. But all the other accounts used by different services are now stuck. For now what I do is simply delete all the password fields expect root and admin in passwd file which does make the system usable but obviously full of holes.

    The system is only running trusted software so I'm not too worried about short term security, but I can't continue running the machine like this. Is there anyway I can log all user login credentials used and then trigger each service using those accounts to get my shadow records fixed?
     
  2. kode-niner

    kode-niner Notebook Consultant

    Reputations:
    34
    Messages:
    279
    Likes Received:
    113
    Trophy Points:
    56
    Code:
    pwconv
    That'll do it.
     
  3. Mr.Koala

    Mr.Koala Notebook Virtuoso

    Reputations:
    568
    Messages:
    2,307
    Likes Received:
    566
    Trophy Points:
    131
    With all the hashes in shadow lost pwconv can only generate empty records:
    I'm looking for a way to get the correct hashes back without digging into the config files of each service, possibly by logging each login attempt with the password/hash used.
     
  4. kode-niner

    kode-niner Notebook Consultant

    Reputations:
    34
    Messages:
    279
    Likes Received:
    113
    Trophy Points:
    56
    How did you end up with hashes in your system or service users? Normally they don't have hashes since they aren't meant for interactive login sessions. Usually they either have ! or * in the password field as they are supposed to be locked.