Don't use shadow passwords on FreeBSD

shadow database doesn't exist by default in FreeBSD -- use "passwd" database
This commit is contained in:
Jake Guffey 2012-06-20 17:22:19 -04:00
parent 37eabffd9c
commit 6264a9b718

View file

@ -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