NSUserName

  • Can anyone tell me what NSUserName will return if the user is authenticated
    using single sign on via LDAP or Active Directory authentication?

    I've been trying to get AD authentication setup to test this but have failed
    miserably.

    Thanks
    Brian
  • It will return the user's short name. What that actually maps to in
    your directory is somewhat configurable by Directory Access.
    Basically, it'll do the right thing.

    -- Finlay

    On 29/12/06, Brian Hawkins <brianhks1...> wrote:
    > Can anyone tell me what NSUserName will return if the user is authenticated
    > using single sign on via LDAP or Active Directory authentication?
    >
    > I've been trying to get AD authentication setup to test this but have failed
    > miserably.
    >
    > Thanks
    > Brian
    > _______________________________________________
    > MacOSX-dev mailing list
    > <MacOSX-dev...>
    > http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >
  • Is there a method to get the context or domain in which they logged into?

    Thanks
    Brian

    On 12/30/06, Finlay Dobbie <finlay.dobbie...> wrote:
    >
    > It will return the user's short name. What that actually maps to in
    > your directory is somewhat configurable by Directory Access.
    > Basically, it'll do the right thing.
    >
    > -- Finlay
    >
    > On 29/12/06, Brian Hawkins <brianhks1...> wrote:
    >> Can anyone tell me what NSUserName will return if the user is
    > authenticated
    >> using single sign on via LDAP or Active Directory authentication?
    >>
    >> I've been trying to get AD authentication setup to test this but have
    > failed
    >> miserably.
    >>
    >> Thanks
    >> Brian
    >> _______________________________________________
    >> MacOSX-dev mailing list
    >> <MacOSX-dev...>
    >> http://www.omnigroup.com/mailman/listinfo/macosx-dev
    >>
    >
  • On 31/12/06, Brian Hawkins <brianhks1...> wrote:
    > Is there a method to get the context or domain in which they logged into?

    Not simply, no. You'd have to use the Directory Services API to search
    for the user on the search node, then get its kDSNAttrMetaNodeLocation
    property. For users authenticated by active directory, this will be
    "/Active Directory/DOMAIN", for NIS it'll be "/BSD/DOMAIN" and for
    LDAP it'll be something like "/LDAPv3/" concatenated with the name
    which is defined in the LDAP mapping in Directory Access.

    Googling around, I came across this:
    <http://lists.apple.com/archives/Macnetworkprog/2005/Nov/msg00026.html>

    -- Finlay
previous month december 2006 next month
MTWTFSS
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Go to today