Posted on 01-20-2012 04:09 AM
EDIT: Extension Attributes are working (sorry can't edit title) just the following script is not giving me a result.
Running this script via jss
#!/bin/sh
userList=$(/usr/bin/dscl . list /Users UniqueID | /usr/bin/awk '$2 > 500 { print $1 }')
# now loop through results and test for membership of the admin group
for u in ${userList} ; do
if [[ `/usr/bin/dscl . read /Groups/admin GroupMembership | /usr/bin/grep -c ${u}` == 1 ]]
then /bin/echo "<results>${u}</results>"
#else /bin/echo "${u} is not an admin.."
fi
done
but I am not getting the result that I want... Nothing is showing up...
Looks like this
Comic Life Version: 1.5.5 (v19107)
File Sharing: Off
Firefox Version: 9.0.1
Flash Version: 11.1.102.55
Last User: rob
List of Admins:
As you can see List of Admins: is blank..
I take that same script and run it in terminal and I get the following result.
<results>rob</results>
Can anyone else try this and see if they can get a result?
Thanks
Solved! Go to Solution.
Posted on 01-20-2012 04:26 AM
Okay people I am not on crack, honest! I figured out my problem
then /bin/echo "<results>${u}</results>"
Should be:
then /bin/echo "<result>${u}</result>"
Posted on 01-20-2012 04:26 AM
Okay people I am not on crack, honest! I figured out my problem
then /bin/echo "<results>${u}</results>"
Should be:
then /bin/echo "<result>${u}</result>"
Posted on 01-20-2012 07:07 AM
I am the original author of that script and I think I fixed that in a different version back on the days of the mailing list.
Glad you got it fixed.
Posted on 01-20-2012 07:10 AM
And for that I did offer free beer to you anytime you come to Munich Germany :-)
Posted on 01-20-2012 07:48 AM
And for that I did offer free beer to you anytime you come to Munich Germany :-)
that sounds great, too bad you cannot email people beers! :-)
Posted on 01-20-2012 07:56 AM
Sure you can
0100110101101001011011000110110001100101011100100010000001001100011010010111010001100101
Happy Friday.