Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
On 09/19/2013 11:53 AM, PƔdraig Brady wrote:
> So I'd avoid getent entirely and do:
Good idea.
> # Add $USER to ensure we have at least one explicit entry
> users="$u"
> # Add 'root' to test multiple groups (as is usually the case)
> id root >/dev/null 2>/dev/null && users="$USERS root"
> # Add 'nobody' to test single group (as is usually the case)
> id nobody >/dev/null 2>/dev/null && users="$USERS nobody"
> # Add $users and '' (implicit $USER) to list to process
> printf '%s\n' $users '' >> users || framework_failure_
Interestingly, the situation is different here (openSUSE):
root is only in group root, and nobody is in the groups
nobody and nogroup.
However, I've added some users which seem to be typical
for being member of one or more groups.
for u in root man postfix sshd nobody ; do
id $u >/dev/null 2>&1 && users="$users $u"
done
New patch attached. Thanks!
Have a nice day,
Berny