Use /etc/passwd instead of getent passwd for sysusers script to filter out LDAP users
This commit is contained in:
parent
6504f796fa
commit
fd52a5c175
4
sysusers
4
sysusers
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/fish
|
||||
|
||||
# Compare /usr/lib/sysusers.d and getent passwd to find unneeded users
|
||||
# Compare /etc/passwd and /usr/lib/sysusers.d to find unneeded users
|
||||
|
||||
for i in (getent passwd | cut -d: -f1)
|
||||
for i in (cat /etc/passwd | cut -d: -f1)
|
||||
echo -n "$i "; grep -or $i /usr/lib/sysusers.d | wc -l
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue