Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

dscl: generating a list of all users and their GUID's

Hi,


I am fixing a nightmare in calendar server. I am having to manually re-add all the .ics files to each users shared calendar through iCal. I want to generate a list of users and their GUID's and I think dscl is the right tool. I don't have great bash skills nor can I get dscl to jump through hoops. I can get individual GUID's for a user ussing


# dscl /LDAPv3/127.0.0.1/ -read /Search/Users/username


but waht I would like to do is generate a list of all the users and their GUIDS


Does anyone know how I can do that?


Thanks!

Xserve, Mac OS X (10.6.8)

Posted on Jun 14, 2012 5:55 PM

Reply
2 replies

Jun 17, 2012 10:42 PM in response to craigfromco

Well... The exact script... I'll leave to you since it requires a little more experience and length of time spent than I wish to do here.


Here's a thought though...


If the names of your home folders is the same as the user name of your users, then you can get that list of user names into a text file.


ls /Users > folderlist.txt


Have a look at this post I did a while ago... It's primary purpose is to rename a large number of files, but the concept would be the same. It'd be pretty easy to modify the command to show you GUID numbers.

https://discussions.apple.com/thread/3952761


HTH

-Graham

dscl: generating a list of all users and their GUID's

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.