diff --git a/cdist/conf/type/__user/explorer/group b/cdist/conf/type/__user/explorer/group index 98ce39c6..2aae2973 100755 --- a/cdist/conf/type/__user/explorer/group +++ b/cdist/conf/type/__user/explorer/group @@ -23,6 +23,11 @@ if [ -f "$__object/parameter/gid" ]; then gid=$(cat "$__object/parameter/gid") - getent group "$gid" || true + getent=$(command -v getent) + if [ X != X"${getent}" ]; then + "${getent}" group "$gid" || true + elif [ -f /etc/group ]; then + grep -E "^(${gid}|([^:]+:){2}${gid}):" /etc/group || true + fi fi diff --git a/cdist/conf/type/__user/explorer/passwd b/cdist/conf/type/__user/explorer/passwd index fdbfb193..677e3ff0 100755 --- a/cdist/conf/type/__user/explorer/passwd +++ b/cdist/conf/type/__user/explorer/passwd @@ -23,5 +23,9 @@ name=$__object_id -getent passwd "$name" || true - +getent=$(command -v getent) +if [ X != X"${getent}" ]; then + "${getent}" passwd "$name" || true +elif [ -f /etc/passwd ]; then + grep "^${name}:" /etc/passwd || true +fi diff --git a/cdist/conf/type/__user/explorer/shadow b/cdist/conf/type/__user/explorer/shadow index 1a8fd809..1e6658d4 100755 --- a/cdist/conf/type/__user/explorer/shadow +++ b/cdist/conf/type/__user/explorer/shadow @@ -31,5 +31,9 @@ case "$os" in esac -getent "$database" "$name" || true - +getent=$(command -v getent) +if [ X != X"${getent}" ]; then + "${getent}" "$database" "$name" || true +elif [ -f /etc/shadow ]; then + grep "^${name}:" /etc/shadow || true +fi