I have a very small script that pulls the group membership for a user:
dsget user UserDN -memberof
What I wanted to do was pull the results of that script, which are the group DNs, into some type of script that would remove the user from those groups. This command will remove the user from the group. But how would I get just one script to do all of it?
dsmod group GroupDN -rmmbr UserDN
Any suggestions would help.