• 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
Re: retrieving the DN from Open Directory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: retrieving the DN from Open Directory


  • Subject: Re: retrieving the DN from Open Directory
  • From: "Joubert Berger" <email@hidden>
  • Date: Mon, 14 Aug 2006 15:05:40 -0400

Dave,

Thanks.  I do exactly this programatically.  But, I am looking up
users.  For example,

dscl localhost -read /Search/Users/rick distinguishedName

This assumes that there is a "distinguishedName" attribute in the object.

But, if you use something like openldap, there is no such attribute.
So, when using

dscl localhost -read /Search/Users/rick

to display the entire object, I do not see the distinguishedName attribute.

But, when I use openldap's search client, I execute

ldapsearch -LLL -x 'uidNumber=1000' dn

I get

dn: uid=rick,ou=People,dc=foobar,dc=biz

So, I read this as the distinguished name for the object whos
attribute uidNumber is 1000 is
uid=rick,ou=People,dc=foobar,dc=biz

That is what I am after in osx :-)

--joubert


On 8/14/06, David Litwin <email@hidden> wrote:
I've written code to do the equivalent of
        dscl localhost -read /Search/Computers/`hostname -s`
distinguishedName
programmatically, but if you can shell out to dscl to do it your life is
much simpler.

Dave

-----Original Message-----
From: darwin-dev-bounces+david_litwin=email@hidden
[mailto:darwin-dev-bounces+david_litwin=email@hidden] On
Behalf Of Joubert Berger
Sent: Sunday, August 13, 2006 3:56 PM
To: Markus Hitter
Cc: email@hidden
Subject: Re: retrieving the DN from Open Directory

No, DN = distinguished name.

For example:
dn: cn=John Doe,dc=example,dc=com

--joubert

On 8/13/06, Markus Hitter <email@hidden> wrote:
>
> Am 13.08.2006 um 22:00 schrieb Joubert Berger:
>
> > First, I must admit, I am not that well versed in Open Directory or
> > LDAP and have only recently started working with Darwin.  So
> > sometimes, I get the terminology wrong ;-)  Anyway, here goes...
>
> So let me guess: "DN" = Domain Name; you're talking about moveable
> computers (laptops).
>
> > I have been tasked with recording the DN when a user logs in.
>
> In a bash shell script, like
>
>         host $HOSTNAME
> or
>         host $(hostname)
> ?
>
> Whatever the reason of your doing is, don't forget those people
> changing the network without logging out. It's as easy as pulling the
> plug here, pop it in there, today.
>
>
> Markus
>
> - - - - - - - - - - - - - - - - - - -
> Dipl. Ing. Markus Hitter
> http://www.jump-ing.de/
>
>
>
>
>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
com

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • RE: retrieving the DN from Open Directory
      • From: "David Litwin" <email@hidden>
References: 
 >Re: retrieving the DN from Open Directory (From: "Joubert Berger" <email@hidden>)

  • Prev by Date: Re: retrieving the DN from Open Directory
  • Next by Date: RE: retrieving the DN from Open Directory
  • Previous by thread: Re: retrieving the DN from Open Directory
  • Next by thread: RE: retrieving the DN from Open Directory
  • Index(es):
    • Date
    • Thread