I am using dseditgroup in my login script to check if a user is a member of the 'Staff' group in Windows Active directory. It has been working fine for a couple of months. We have around 4000 users so its quite well tested.
I have one Student who's login fails because the return value from group is incorrectly being returned as true even though he is not a member of Staff.
here is the code which is returning 1 for the user, but should be returning 0.
groupcheck=$( dseditgroup -o checkmember -n /Active Directory/"${netbios}"/All Domains -m "${username}" "${groupmembership}" | grep -c "yes" )
A few runs in terminal confirms that it it returning the wrong result.
Has anyone else seen this or can offer any suggestions before I zap the user.
Thanks.