Mac Thread, extracting the list of Users in a group using dscl in Technical; Hello,
I am trying to extract a list if the users inside an AD group using the dscl command in ...
30th June 2009, 07:51 PM #1
extracting the list of Users in a group using dscl
I am trying to extract a list if the users inside an AD group using the dscl command in OS X terminal.
So far i can get to the groups using the command:
Now i hit the problem. If i try to list the Staff\ Group and then read the PrimaryGroupID and use $1,$2 > filename.txt, it doesn't read any data or it throws an error.
dscl /Active\ Directory/All\ Domains/Groups/
How can i get to the group Staff\ Group to read the attributes and extract the list of users in the group?
Thanks for your help.
IDG Tech News
1st July 2009, 10:30 AM #2
- Rep Power
I see what you mean, can't get it to work myself either - are you just after a list of users?
1st July 2009, 10:46 AM #3
I am trying to create a script for the home dirs of the users in AD on the OS X Server (see the coding forum). I need to be able to list the group members so i can extract the staff group users and create their home dirs in the Staff folder.
I also then need to be able to extract the pupils users and create their home dir into their own pupil folder. I could just create a single user dir for all of them i suppose
I also would like to extract the PrimaryGroupID so i could chown using the UniqueID:PrimaryGroupID /Users/$1Username
This should then sort out the permissions side of things. So far i have managed to get the list of Users and their corresponding UIDs and using this list created their home dirs and also copied the pre-created home dir template into each one. I just now need to sort out the permissions
Last Post: 29th July 2009, 02:49 PM
By leco in forum MIS Systems
Last Post: 26th January 2009, 01:46 PM
By sLiDeR in forum Windows
Last Post: 4th December 2007, 12:40 PM
By humpda in forum Scripts
Last Post: 26th July 2007, 09:33 AM
Last Post: 31st May 2007, 04:15 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)