5
votes

I've got a Mac app written in Java. I'm trying to get the fully qualified domain name (LDAP) of the current user account from the system. The current user would be logged into the system through the active directory. An example of the string I am after would be:

domain\[email protected]

Any assistance would be greatly appreciated!

1

1 Answers

1
votes

I think the issue would be determining the userID within Active Directory. Once you had that, it should be pretty easy to determine the details of the user, assuming you had a LDAP connection to AD with proper permissions.

If the username of the user logged-in to the Mac is the samaccountName (or some other attribute within AD) you could read the local environment for the $USER and search for the value.

-jim