Merge pull request #557 from uqam-fob/type-user-explorers
__user: explore with /etc files
This commit is contained in:
commit
11a974aeff
3 changed files with 18 additions and 5 deletions
|
@ -23,6 +23,11 @@
|
||||||
|
|
||||||
if [ -f "$__object/parameter/gid" ]; then
|
if [ -f "$__object/parameter/gid" ]; then
|
||||||
gid=$(cat "$__object/parameter/gid")
|
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
|
fi
|
||||||
|
|
||||||
|
|
|
@ -23,5 +23,9 @@
|
||||||
|
|
||||||
name=$__object_id
|
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
|
||||||
|
|
|
@ -31,5 +31,9 @@ case "$os" in
|
||||||
esac
|
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
|
||||||
|
|
Loading…
Reference in a new issue