4 # Copyright (c)2008,2009 Barton IT-Consulting, Alexander Barton
6 # This is free software; see the source for copying conditions. There is NO
7 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 echo "$NAME (userlist.macosx.sh) release $RELEASE"
14 echo "Copyright (c)2008,2009 Barton IT-Consulting, Alex Barton (alex@barton-it.de)"
16 echo "This is free software; see the source for copying conditions. There is NO"
17 echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
19 echo "Usage: $0 [--all|-a] [--local|-l]"
39 sw_vers -productName | grep -i "Server" >/dev/null 2>&1
40 if [ $? -eq 0 -a -z "$LOCAL" ]; then
47 USER_BASE="/LDAPv3/127.0.0.1/Users"
55 [ -n "$ALL" ] && UID_MIN=0
57 dscl "$HOST" -list "$USER_BASE" | while read x; do
59 id=`dscl "$HOST" -read "$USER_BASE/$x" UniqueID | cut -d: -f2`
60 if [ "$id" -gt $UID_MIN ]; then