Jump to content

LDAP


Lempke
 Share

Recommended Posts

I want to use the following line in a script.

$oUser = GetObject(LDAP://cn=Smith, Joe,ou=Sales,dc=MyDomain,dc=com)

But this doesn't work due to the "," in de common name. Is there a way that I can solve this?

Changing the common name to Joe Smith is not an option. I have to make it work with cn=Smith, Joe

Please help

Link to comment
Share on other sites

I want to use the following line in a script.

$oUser = GetObject(LDAP://cn=Smith, Joe,ou=Sales,dc=MyDomain,dc=com)

But this doesn't work due to the "," in de common name. Is there a way that I can solve this?

Changing the common name to Joe Smith is not an option. I have to make it work with cn=Smith, Joe

Please help

$oUser = GetObject(LDAP://cn=Smith\, Joe,ou=Sales,dc=MyDomain,dc=com)

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I have tried this but it didn't work...

that's the only way I know of. What's the error message?

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

mmm your question is not enough accurate

LDAP and getobject WORKS well all the time

If i understand well, your name is "Smith, Joe" ?

are you sure ? this Distinguished Name is return by a request ?

verify your syntax, and verify your rights.

After, what do you want t return ?

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

Kurt

Then I must have made a typo.

I don't get an error, just no results in the things a want to retrieve.

are you sure there is such an entry in your LDAP directory? In ADS there is

usually only an entry for the "display name" of the user, which is usually

of the format "firstname lastname" or "lastname firstname", so there is

no "," between the two.

e.g.

"cn=joe test,ou=sales,dc=test,dc=com"

or

"cn=test joe,ou=sales,dc=test,dc=com"

Use Softerras ldapbrowser (www.ldapbrowser.com) to view the content of

your ADS structure and figure out how the user is stored in the directory.

EDIT: In general - search the forum for "+objget +ldap" to find some working LDAP samples.

EDIT#2: To be a bit more clear. It is absolutely possible to have a user with a DN of "cn=Smith\, Joe,ou=Sales,dc=MyDomain,dc=com" if you create it like that. It's just not the standard!

Cheers

Kurt

Edited by /dev/null

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Yes, that's not a standart, and it could be really complex to lead it

in the future if you plan to develop more ldap scripts

for now, i think like /dev/null that your ADs path is not correct

-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...