+ Post New Thread
Results 1 to 3 of 3
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 ...
  1. #1

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,192
    Thank Post
    300
    Thanked 215 Times in 185 Posts
    Rep Power
    57

    extracting the list of Users in a group using dscl

    Hello,

    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:

    Code:
    dscl /Active\ Directory/All\ Domains/Groups/
    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.

    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.

  2. #2

    Join Date
    May 2008
    Posts
    213
    Thank Post
    2
    Thanked 27 Times in 27 Posts
    Rep Power
    18
    I see what you mean, can't get it to work myself either - are you just after a list of users?

  3. #3

    Join Date
    May 2006
    Location
    West Bromwich
    Posts
    2,192
    Thank Post
    300
    Thanked 215 Times in 185 Posts
    Rep Power
    57
    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



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 4
    Last Post: 29th July 2009, 03:49 PM
  2. List of users
    By leco in forum MIS Systems
    Replies: 3
    Last Post: 26th January 2009, 02:46 PM
  3. List of users logged on a workstation
    By sLiDeR in forum Windows
    Replies: 6
    Last Post: 4th December 2007, 01:40 PM
  4. Replies: 5
    Last Post: 26th July 2007, 10:33 AM
  5. Replies: 2
    Last Post: 31st May 2007, 05:15 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •