feat(logins): every account a person can log in with, as one read-only reading (NetOrk/netork#2707)
LoginAccountsMixin.get_login_accounts: root and UID 1000 on with a login shell, from /etc/passwd without the comment field; the newest last login of lastlog2, lastlog, wtmpdb last and last, with where it came from; the password state and expiry from passwd -S and chage -l; the failed attempts since the last login from lastb, else faillock. Root first, the login user where root is refused, when what needs root is None.
This commit is contained in:
1 parent
07920941c8
commit
91b939236f
4 files changed
+950
No files matched your search
@@ -171,6 +171,16 @@ command line, and `ID`/`ID_LIKE` from `/etc/os-release`. Read as root first and,
|
||||
is refused, as the login user without the profile counts. A driver supplies
|
||||
`_run_hardening_command(command, privileged=)`; what was not read is `None`, never "off".
|
||||
|
||||
`LoginAccountsMixin` (`get_login_accounts`) is mixed in the same way: every account on the
|
||||
host a person can log in with -- root and UID 1000 on, with a shell that is not `nologin` or
|
||||
`false`, from `/etc/passwd` (name, UID, home and shell only; directory accounts are not read)
|
||||
-- with its last login, the newest any of `lastlog2`, `lastlog`, `wtmpdb last` and `last`
|
||||
knows, and where it came from; its lock and expiry from `passwd -S` and `chage -l`; and the
|
||||
failed attempts since that login, from `lastb` (the newest 1000 per account) or else
|
||||
`pam_faillock`'s tally. Read as root first and, where root is refused, as the login user,
|
||||
when the lock, the expiry and the failures are `None`. A driver supplies
|
||||
`_run_login_accounts_command(command, privileged=)`.
|
||||
|
||||
`ServicePackagesMixin` (`get_service_packages`) is mixed in the same way: which installed
|
||||
packages each systemd service is made of — the one shipping its unit file and the one
|
||||
shipping the binary its `ExecStart` runs, by `dpkg -S` or `rpm -qf`, not the libraries
|
||||
|
||||
Reference in new issue
Block a user