Re: retrieving the DN from Open Directory
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com 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 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=bigfix.com@lists.apple.com [mailto:darwin-dev-bounces+david_litwin=bigfix.com@lists.apple.com] On Behalf Of Joubert Berger Sent: Sunday, August 13, 2006 3:56 PM To: Markus Hitter Cc: darwin-dev@lists.apple.com 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 <mah@jump-ing.de> 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/david_litwin%40bigfix. com This email sent to david_litwin@bigfix.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... On 8/14/06, David Litwin <david_litwin@bigfix.com> wrote: This email sent to site_archiver@lists.apple.com
participants (1)
-
Joubert Berger