dscl to find GUID on mac

Hi. I am running on OS X 10.9.3 and I'm wondering how I can find my GUID with dscl in the Terminal? I've looked at several commands but none of them seems to work, I'm logged in to my root user and if anyone knows the command please tell me.

Posted on Jun 7, 2014 10:25 AM

Reply
5 replies

Mar 19, 2017 11:23 AM in response to Adrian Cladri

Um, sneaker net? 🙂


Do you know how to use ssh & Terminal? If you have remote login enabled (System Preferences> Sharing) you can ssh to the remote Mac & run the commands as if you are on that machine. You will probably want to use an admin account to connect so that you can use sudo when required.


Something like this should get you to a password prompt if you enable ssh first…

ssh adminusername@othermac.local


Look around for guides…

https://www.techwalla.com/articles/how-to-use-ssh-on-mac-os-x

http://accc.uic.edu/answer/how-do-i-use-ssh-and-sftp-mac-os-x

Or ask if you are unsure.


NOTE: If that other machine is an open directory server & you are bound to it you can read it's records locally but that is generally an 'enterprise thing'.

Jun 7, 2014 11:12 AM in response to evengud

Are you using the interactive prompt?


In Terminal

dscl

read /Local/Default/Users/USERNAME/ GeneratedUID


Replace your USERNAME



Or in one step

dscl . -read /Users/USERNAME/ GeneratedUID


Don't forget 🙂

man dscl


You can grab this info via the UI by selecting a user in System Preferences & right clicking to select 'Advanced Options'.



P.S. you don't need to be root, just login as an admin & use sudo as required for editing via dscl. You can read the directory as a normal user.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

dscl to find GUID on mac

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