diff options
author | Christian Brauner <brauner@kernel.org> | 2023-09-25 16:42:35 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-09-26 11:06:07 +0200 |
commit | 6b825af30487e0d9aba0ecb5549db2f1a75da306 (patch) | |
tree | 88e0cb7ff656e056b496844aac50f1f0f27655e6 | |
parent | 78d0783746cb2b199c5f10b61a6c7fec547dd36f (diff) | |
download | xfstests-dev-b4/fstests-check-user.tar.gz |
common: check user and group existence via idb4/fstests-check-user
Newer machines support the creation of users that don't appear in
/etc/passwd but are only available via nss or userdbd. Use getent passwd
to check for a users existence.
With this change I can run xfstests on systems where the users are
created via systemd-userdbd drop-ins. See the documentation in [1] and [2].
Link: [1]: https://man7.org/linux/man-pages/man8/nss-systemd.8.html
Link: [2]: https://man7.org/linux/man-pages/man5/nsswitch.conf.5.html
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | common/rc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2450,7 +2450,7 @@ _yp_active() _cat_passwd() { [ $(_yp_active) -eq 0 ] && ypcat passwd - cat /etc/passwd + getent passwd } # cat the group file |