LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ldap doesn't go to search active directory / why? (https://www.linuxquestions.org/questions/linux-server-73/ldap-doesnt-go-to-search-active-directory-why-4175424161/)

samanka80 08-29-2012 01:44 PM

I think I found my problem... apparently I need pam_krb5 to do that... I try to install it, I already have errors, with port pam_krb5.4.4 I have this issue:

http://www.linuxquestions.org/questi...06#post4767606

and with pam_krb5.4.6 I have errors too. I keep trying.

samanka80 08-29-2012 03:12 PM

Well... I am going to die here... I managed to install pam_krb5 with MIT, I use KRB1.9 and the package info says that it is MIT. After testing, I figured out that "kinit test@seth.local" doesn't work anymore, even I restarted kerberos... It says that it can not find any kdc in realm seth.local. I checked krb5.conf and everything was ok. I think it has something to do with installing pam_krb5.

Anybody has any idea why?

I am going to open a new topic for this, coz this is a totally different issue...

here is the new topic:

http://www.linuxquestions.org/questi...00#post4767700

shalomz 02-21-2018 09:09 AM

Worked for Me
 
Quote:

Originally Posted by samanka80 (Post 4765263)
new thing! I used this command:

ldapsearch -x -h 10.0.5.38 -D "ldap@seth.local" -b "dc=seth,dc=local" -w ***** "sAMAcountName=test"
I mean "ldap@seth.local" instead of cn=ldap,ou=users,dc=seth,dc=local and have this result:



# extended LDIF
#
# LDAPv3
# base <dc=seth,dc=local> with scope subtree
# filter: sAMAcountName=test
# requesting: ALL
#

# search reference
ref: ldap://ForestDnsZones.seth.local/DC=ForestDnsZones,DC=seth,DC=local

# search reference
ref: ldap://DomainDnsZones.seth.local/DC=DomainDnsZones,DC=seth,DC=local

# search reference
ref: ldap://seth.local/CN=Configuration,DC=seth,DC=local

# search result
search: 2
result: 0 Success

# numResponses: 4
# numReferences: 3

and then I replaced "sAMAcountName=test" with "test@seth.local" and I have many of this: seems like it is seeing my active directory.


# test, Users, seth.local
dn: CN=test,CN=Users,DC=seth,DC=local

# alex, Users, seth.local
dn: CN=alex,CN=Users,DC=seth,DC=local

# THINKPAD, Users, seth.local
dn: CN=THINKPAD,CN=Users,DC=seth,DC=local

# ldap, Computers, seth.local
dn: CN=ldap,CN=Computers,DC=seth,DC=local

# ldap, Users, seth.local
dn: CN=ldap,CN=Users,DC=seth,DC=local

# search reference
ref: ldap://ForestDnsZones.seth.local/DC=ForestDnsZones,DC=seth,DC=local

# search reference
ref: ldap://DomainDnsZones.seth.local/DC=DomainDnsZones,DC=seth,DC=local

# search reference
ref: ldap://seth.local/CN=Configuration,DC=seth,DC=local

# search result
search: 2
result: 0 Success

# numResponses: 295
# numEntries: 291
# numReferences: 3


Please tell me if you see something wrong, I go digg more.

This solution worked for me. I just ran the command
Code:

ldapsearch -x -h <host> -D "<user>@<dc1><dc2>" -b "dc=<dc1>,dc=<dc2>" -W "sAMAcountName=<account_name>"
. This prompted me for a password, and as soon as I keyed in my pass, I got access to the AD.


All times are GMT -5. The time now is 04:56 AM.