Posted on 11-02-2011 09:38 AM
I was having trouble getting a script to run dseditgroup using JSS 8.3.1.
dseditgroup -o checkmember -n /Default/Local -m $3 lpadmin
I kept getting errors about no group name being specified. I put
logger "the user is: $3"
which returned the user as being blank. Shouldn't the third parameter be
the currently logged in user? I worked around it by using a line found in
the archive
username=/usr/bin/w | grep console | awk '{print $1}'
Thanks,
-- jmca
Posted on 11-02-2011 09:41 AM
John,
My experience with $3 is that it only works on scripts executed at login. If the user is already logged in, that variable isn't passed.
--
Bryan Vines
bkvines at wgclawfirm.com
Posted on 11-02-2011 09:55 AM
This is correct, $3 only passes as the current user when the script is ran at log in.
Posted on 11-02-2011 10:41 AM
Posted on 11-02-2011 10:51 AM
Thanks. Learn something new everyday.