Author |
Message |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
I need to list all the shares on a mac server (10.4.11). I also need to list all users & groups from the open directory installed on that server. If I can list all users & groups with their relevant share access that would be even better.
Is this possible to do? Can anyone help?
My googlefu is failing me
|
Thu Jul 07, 2011 9:19 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
I don't have my Mac at work...I'll have a little look later if no one else replies 
|
Thu Jul 07, 2011 9:51 am |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
|
Thu Jul 07, 2011 9:54 am |
|
 |
tombolt
Spends far too much time on here
Joined: Fri Apr 24, 2009 8:38 am Posts: 2967 Location: Dorchester, Dorset
|
Do you have access to a mac? Wouldn't workgroup manager do all that for you?
|
Thu Jul 07, 2011 10:13 am |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
I have access to the mac (but only over a slow remote link). There are over 100 users & 30 groups. Probably 50+ shares as well. I can go through every user, group & share individually if I have to but if I can script it then I can add the scripts to my monitoring tools for future audits etc
|
Thu Jul 07, 2011 10:24 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
For reference later, what format would be good? Something like: 
|
Thu Jul 07, 2011 11:12 am |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
That looks about right (I think)
I just need to be able to confirm the users listed. The groups & their members. The shares & users/groups able to access them.
Cheers for your help with this
|
Thu Jul 07, 2011 12:39 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
OK, groups and users aren't a problem, shares are a little more difficult. I'll likely not be able to look at the script much more until the weekend, but I'll hopefully get it to you by the end of Sunday if that's ok?
Ben
|
Thu Jul 07, 2011 10:06 pm |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
That would be more than OK. Users & groups would be perfect. I can map out the shares manually if it's a ballache
|
Fri Jul 08, 2011 7:06 am |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Evening Sas, are your shares SMB/AFP/NFS.etc.? or a mix of different shares?
|
Sat Jul 09, 2011 6:07 pm |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
SMB & AFP I believe. Cheers mate
|
Sat Jul 09, 2011 7:38 pm |
|
 |
forquare1
I haven't seen my friends in so long
Joined: Thu Apr 23, 2009 6:36 pm Posts: 5150 Location: /dev/tty0
|
Afternoon Sas, On the server, running the following should get a list of groups and their users: It seems OS X server comes with a command called `sharing`, do the following to list the shares: I can't see the output of this command (I only have OS X client), so I can't add it to the script, and I'm not sure if it only tells you what shares there are, or if it also states permissions... It may be that the last command will do everything you need. If you can give me a mock/sample output of the command I can try and tailor it more to your needs if necessary. Sorry it's taken so long and I've not really solved the whole problem. That sharing command is pretty elusive on the net... Ben
|
Sun Jul 10, 2011 2:31 pm |
|
 |
saspro
Site Admin
Joined: Thu Apr 23, 2009 5:53 pm Posts: 8603 Location: location, location
|
That looks brilliant. I'll give it a go tomorrow & let you know the results
|
Sun Jul 10, 2011 7:35 pm |
|
|