Skip navigation

Use dscl to write to file a list of user recordNames and MailAttribute

772 Views 0 Replies Latest reply: Jul 24, 2012 3:52 AM by Martin Rogers RSS
Martin Rogers Calculating status...
Currently Being Moderated
Jul 24, 2012 3:52 AM

Hello All,


osx server 10.4


I'm attempting to export a list of user specific account keys to a file. So far I can export a list of user names:

A) dscl /LDAPv3/ -list /Users >> aFile.txt


I can read the requested attributes for a single user:

B) dscl /LDAPv3/ -read /Users/MyUser recordName MailAttribute >> aFile.txt


What I can't work out, due to my lack of Mac Terminal/Scripting knowledge, is how to export the recordName and MailAttribute keys for each user in the exported users list.


All help greatly appreciated.....


PS I don;t need the workgroup manager export as that has far too much "fluff" in it for my purpose.

Xserve, Mac OS X (10.4.1)


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.