Tuesday, September 22, 2009

How to emulate Unix’ getent with MacOSX’s dscl


In linux there is:
getent passwd [uid number]

With dscl, you could do something like this:
dscl . -search /Users UniqueID [uid number]
dscl . -read /Users/[username]

No comments:

Post a Comment