How can I get the domain name for a user logged into a Mac via Active Directory
        Posted  
        
            by Lawrence Johnston
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Lawrence Johnston
        
        
        
        Published on 2010-06-01T21:11:45Z
        Indexed on 
            2010/06/01
            21:13 UTC
        
        
        Read the original article
        Hit count: 208
        
In my Cocoa app how can I get the current user's domain when they're logged in via Active Directory?
I need to determine two things: 1. If the current user is logged on to an Active Directory domain (only need to handle Active Directory). 2. If 1, the domain of the user.
I've found references to Directory Services and the Open Directory Programming Guide but the latter is 10.6 only (I must support 10.5+) and I could not find any examples for the former that gave me an idea of what I needed to do.
© Stack Overflow or respective owner