• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How can I get the domain name for a user logged into a Mac via Active Directory?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How can I get the domain name for a user logged into a Mac via Active Directory?


  • Subject: How can I get the domain name for a user logged into a Mac via Active Directory?
  • From: Larry Johnston <email@hidden>
  • Date: Thu, 10 Jun 2010 10:23:31 -0700

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.

Somebody recommended dsconfigad -show to me, which works to tell if
the computer is bound to a domain, but now I need to figure out if the
currently logged in user is a local or a domain user.

It is okay if this requires Administrator access to the machine, but
it cannot require admin access to the domain.

Thanks.

-Lawrence Johnston
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Notification when network volume disappears
  • Next by Date: Adding attributes to NSMutableAttributedString
  • Previous by thread: Re: NSAttributedString with columns
  • Next by thread: Adding attributes to NSMutableAttributedString
  • Index(es):
    • Date
    • Thread