]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysusers: properly mark generated accounts as locked
authorLennart Poettering <lennart@poettering.net>
Wed, 7 Aug 2019 10:35:29 +0000 (12:35 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 Aug 2019 16:19:56 +0000 (18:19 +0200)
commit636e72bce63e7e99b76357f7d524d16f61558775
treed639e6ef58a33ab6e6325fe550bee088b07f4f81
parent5d9bc22ac031db49f34a0187662d3ba8e06f849f
sysusers: properly mark generated accounts as locked

Previously, we'd only set the shell to /usr/bin/nologin and lock the
password for system users. Let's go one step further and also lock the
whole account.

This is a paranoid safety precaution, since neither disabling the shell
like this nor disabling the password is sufficient to lock an account,
since remote shell tools generally allow passing different shells, and
logins into ftp or similar protocols don't know the shell concept anyway.
Moreover, in times of ssh authentication by password is just one
option of authentication among many.

Takes inspiration from the recommendations in usermod(8)'s -L switch:

    "Note: if you wish to lock the account (not only access with a
    password), you should also set the EXPIRE_DATE to 1."
src/sysusers/sysusers.c