Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • Also, you need root permissions to read the shadow file (the permissions requirement is the main reason the file exists after all). Commented Nov 1, 2018 at 16:43
  • 2
    @SimonRichter As far as I can gather, you need root to run passwd -S for other users, too. Not for your own user, though. Commented Nov 1, 2018 at 17:16
  • 3
    FWIW, it (incorrectly) reports L for my own (Kerberos with LDAP) account here, I suppose because it can't get hold of the password hash. Chances are passwd -S is not going to be useful for many authentication schemes beyond /etc/shadow anyway. Commented Nov 1, 2018 at 19:25
  • @StéphaneChazelas Hmm, that's a shame... I'd rather hoped they would map some LDAP attribute to that field. (I haven't used LDAP in a while, so I couldn't check that it actually did) Commented Nov 1, 2018 at 19:52
  • 2
    getent passwd $ACCOUNT gets the entry from whatever source behind is used for authentication. Commented Nov 1, 2018 at 22:51