forked from ungleich-public/cdist
Don't use shadow passwords on FreeBSD
shadow database doesn't exist by default in FreeBSD -- use "passwd" database
This commit is contained in:
parent
37eabffd9c
commit
6264a9b718
1 changed files with 8 additions and 1 deletions
|
@ -22,6 +22,13 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
name=$__object_id
|
name=$__object_id
|
||||||
|
os="$($__explorer/os)"
|
||||||
|
# Default to using shadow passwords
|
||||||
|
database="shadow"
|
||||||
|
|
||||||
getent shadow "$name" || true
|
if [ "$os" = "freebsd" ]; then
|
||||||
|
database="passwd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
getent "$database" "$name" || true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue