LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-12-2021, 07:52 PM   #1
jag7720
Member
 
Registered: Aug 2003
Posts: 53

Rep: Reputation: 15
OpenLDAP client login


This is an LDAP first time.

I just build an OpenLDAP server so I could have my desktops (Linux and Windows) use it to log in.

The first client is a Ubuntu desktop and I installed libpam=ldap and nscd and configed them. Now my desktop can't have a LDAP user log in.

Not sure what I'm missing.

Here is an ldapsearch

root@Tracy-Lounge-4:~# ldapsearch -x -b "dc=svdpacademy,dc=org" -H ldap://192.168.1.105
# extended LDIF
#
# LDAPv3
# base <dc=svdpacademy,dc=org> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# svdpacademy.org
dn: dc=svdpacademy,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: SVdP-Avademy
dc: svdpacademy

# admin, svdpacademy.org
dn: cn=admin,dc=svdpacademy,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# Groups, svdpacademy.org
dn: ou=Groups,dc=svdpacademy,dc=org
objectClass: organizationalUnit
objectClass: top
ou: Groups

# admin, Groups, svdpacademy.org
dn: cn=admin,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 500
cn: admin
objectClass: posixGroup
objectClass: top

# Teachers, svdpacademy.org
dn: cn=Teachers,dc=svdpacademy,dc=org
gidNumber: 501
cn: Teachers
objectClass: posixGroup
objectClass: top

# Students, Groups, svdpacademy.org
dn: cn=Students,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 502
cn: Students
objectClass: posixGroup
objectClass: top

# Teachers, Groups, svdpacademy.org
dn: cn=Teachers,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 503
cn: Teachers
objectClass: posixGroup
objectClass: top

# Religous, Groups, svdpacademy.org
dn: cn=Religous,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 504
cn: Religous
objectClass: posixGroup
objectClass: top

# Jason Greene, admin, Groups, svdpacademy.org
dn: cn=Jason Greene,cn=admin,ou=Groups,dc=svdpacademy,dc=org
cn: Jason Greene
givenName: Jason
sn: Greene
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: jgreene
homeDirectory: /school-2/School_data/Maintenance/jgreene
uidNumber: 1002
gidNumber: 1002

# search result
search: 2
result: 0 Success

# numResponses: 10
# numEntries: 9
root@Tracy-Lounge-4:~# ldapsearch -x -b "dc=svdpacademy,dc=org" -h ldap://192.168.1.105
Could not create LDAP session handle for URI=ldap://ldap:%2F%2F192.168.1.105 (-9): Bad parameter to an ldap routine



Any help would be great.
Thanks
 
Old 08-13-2021, 09:12 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,
Quote:
root@Tracy-Lounge-4:~# ldapsearch -x -b "dc=svdpacademy,dc=org" -h ldap://192.168.1.105
Could not create LDAP session handle for URI=ldap://ldap:%2F%2F192.168.1.105 (-9): Bad parameter to an ldap routine
If you use the -h option (deprecated in favor of -H option), you should use either the IP address or the hostname of the ldap server:
Code:
ldapsearch -x -b "dc=svdpacademy,dc=org" -h 192.168.1.105
Regards
 
Old 08-13-2021, 03:49 PM   #3
jag7720
Member
 
Registered: Aug 2003
Posts: 53

Original Poster
Rep: Reputation: 15
here is the output with the -h option

root@Tracy-Lounge-4:~# ldapsearch -x -b "dc=svdpacademy,dc=org" -h 192.168.1.105
# extended LDIF
#
# LDAPv3
# base <dc=svdpacademy,dc=org> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# svdpacademy.org
dn: dc=svdpacademy,dc=org
objectClass: top
objectClass: dcObject
objectClass: organization
o: SVdP-Avademy
dc: svdpacademy

# admin, svdpacademy.org
dn: cn=admin,dc=svdpacademy,dc=org
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator

# Groups, svdpacademy.org
dn: ou=Groups,dc=svdpacademy,dc=org
objectClass: organizationalUnit
objectClass: top
ou: Groups

# admin, Groups, svdpacademy.org
dn: cn=admin,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 500
cn: admin
objectClass: posixGroup
objectClass: top

# Teachers, svdpacademy.org
dn: cn=Teachers,dc=svdpacademy,dc=org
gidNumber: 501
cn: Teachers
objectClass: posixGroup
objectClass: top

# Students, Groups, svdpacademy.org
dn: cn=Students,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 502
cn: Students
objectClass: posixGroup
objectClass: top

# Teachers, Groups, svdpacademy.org
dn: cn=Teachers,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 503
cn: Teachers
objectClass: posixGroup
objectClass: top

# Religous, Groups, svdpacademy.org
dn: cn=Religous,ou=Groups,dc=svdpacademy,dc=org
gidNumber: 504
cn: Religous
objectClass: posixGroup
objectClass: top

# Jason Greene, admin, Groups, svdpacademy.org
dn: cn=Jason Greene,cn=admin,ou=Groups,dc=svdpacademy,dc=org
cn: Jason Greene
givenName: Jason
sn: Greene
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: top
uid: jgreene
homeDirectory: /school-2/School_data/Maintenance/jgreene
uidNumber: 1002
gidNumber: 1002

# search result
search: 2
result: 0 Success

# numResponses: 10
# numEntries: 9
 
Old 08-14-2021, 01:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
here is the output with the -h option

root@Tracy-Lounge-4:~# ldapsearch -x -b "dc=svdpacademy,dc=org" -h 192.168.1.105
<-snip->
# search result
search: 2
result: 0 Success

# numResponses: 10
# numEntries: 9
So it works too with the -h option.
 
Old 08-14-2021, 08:16 AM   #5
jag7720
Member
 
Registered: Aug 2003
Posts: 53

Original Poster
Rep: Reputation: 15
yes,

I'm still stuck

The first client is a Ubuntu desktop and I installed libpam=ldap and nscd and configed them. Now my desktop can't have a LDAP user log in.

Not sure what I'm missing.
 
Old 08-14-2021, 11:07 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by jag7720 View Post
yes,

I'm still stuck

The first client is a Ubuntu desktop and I installed libpam=ldap and nscd and configed them. Now my desktop can't have a LDAP user log in.

Not sure what I'm missing.
You could follow the steps here
 
Old 08-11-2023, 04:36 AM   #7
soestwerl
LQ Newbie
 
Registered: Aug 2023
Posts: 1

Rep: Reputation: 0
ldap client sasl auth cominication problem

When I use the "sasldb2" database with the "saslpasswd2 -c -u" command to add users, the SASL authentication test with "swaks" is successful. However, I'm unable to authenticate LDAP users using SASL. I've configured "/etc/default/saslauthd" accordingly, and I can test LDAP users using "testsaslauth -u -p" and see the users with "getent passwd." But when I try to test LDAP users' usernames and passwords with "swaks," I receive the error "535 5.7.8 Error: authentication failed: authentication failure *** No authentication type succeeded." What should I do in this case?

smtpd[100188]: warning: localhost[127.0.0.1]: SASL PLAIN authentication failed: no mechanism available
Aug 8 06:42:45 lastpostfix postfix/smtpd[100188]: disconnect from localhost[127.0.0.1] ehlo=1 auth=0/3 quit=1 commands=2/5
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: connect from localhost[127.0.0.1]
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: localhost[127.0.0.1]: SASL CRAM-MD5 authentication failed: no mechanism available
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: SASL authentication problem: unknown password verifier(s) auxprop
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: localhost[127.0.0.1]: SASL LOGIN authentication failed: no mechanism available
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: SASL authentication problem: unknown password verifier(s) auxprop
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: SASL authentication failure: Password verification failed
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: warning: localhost[127.0.0.1]: SASL PLAIN authentication failed: no mechanism available
Aug 8 08:06:11 lastpostfix postfix/smtpd[102342]: disconnect from localhost[127.0.0.1] ehlo=1 auth=0/3 quit=1 commands=2/5

535 5.7.8 Error: authentication failed: authentication failure
-> AUTH LOGIN
<- 334 VXNlcm5hbWU6
-> a29ucmFk
<- 334 UGFzc3dvcmQ6
-> MTI=
<** 535 5.7.8 Error: authentication failed: authentication failure
-> AUTH PLAIN AGtvbnJhZAAxMg==
<** 535 5.7.8 Error: authentication failed: authentication failure
*** No authentication type succeeded
-> QUIT
<- 221 2.0.0 Bye
wenn prostfix restart wurde

postfix1 postfix/master[5123]: terminating on signal 15
Aug 10 13:16:24 postfix1 postfix/postfix-script[5596]: warning: not owned by root: /var/spool/postfix/etc/sasldb2
Aug 10 13:16:25 postfix1 postfix/postfix-script[5764]: starting the Postfix mail system
Aug 10 13:16:25 postfix1 postfix/master[5766]: daemon started -- version 3.4.13, configuration /etc/postfix
Aug 10 13:17:03 postfix1 postfix/smtpd[5792]: connect from localhost[127.0.0.1]
Aug 10 13:17:03 postfix1 postfix/smtpd[5792]: E836C316F: client=localhost[127.0.0.1], sasl_method=LOGIN, sasl_usernam
 
  


Reply

Tags
active directory, ldap, openldap



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Centos 6.4 with OpenLDAP+TLS: OpenLDAP ok, add TLS =>not ok chrism01 Linux - Server 2 10-27-2013 03:15 PM
nss_ldap, openldap and openldap-server ... what is openldap for? chakkerz Linux - Server 2 08-13-2009 07:16 PM
LXer: OpenLDAP Quick Tips: OpenLDAP Logfile analysis LXer Syndicated Linux News 0 12-01-2008 04:00 PM
LXer: OpenLDAP Quick Tips: Regularly upgrade OpenLDAP! LXer Syndicated Linux News 0 11-25-2008 02:00 PM
LXer: OpenLDAP Quick Tips: Using syslog or syslog-ng with slapd for OpenLDAP logging LXer Syndicated Linux News 0 11-14-2008 08:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration