LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-04-2009, 06:11 AM   #1
gxw
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
Question Can't log in despite ldappasswd returning success


Hi,

I'm trying to set up LDAP server & client operating between two VMs. All seems to have gone OK and ldapsearches work but I still can't ssh into the client machine using a uid defined on the server.

I tried changing the password as follows:

[root@server openldap]# ldappasswd -x -D "cn=root,dc=example,dc=com" -w secret -s newpass "uid=testuser1,ou=People,dc=example,dc=com"
Result: Success (0)
[root@server openldap]#

But when I ssh I get

[root@client ~]# ssh testuser1@server.example.com
testuser1@server.example.com's password:
Permission denied, please try again.
testuser1@server.example.com's password:

I am typing in newpass as the password but as you can see, not getting in.

What else do I need to do other than the ldappasswd?

I restarted the ldap service but no joy there.

Ideas please? Is it something to do with encryption?
 
Old 10-04-2009, 08:38 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
I'm guessing that user has no ssh access on the client, and it probably has nothing to do with LDAP at all. Take a look here:https://help.ubuntu.com/9.04/serverg...sh-server.html, you might find something interesting.
 
Old 10-04-2009, 08:40 PM   #3
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Just spotted this:
Code:
[root@client ~]# ssh testuser1@server.example.com
you should realise you are going the wrong way around, I doubt you have setup the machine running the LDAP server to be a client also have you?
 
Old 10-05-2009, 01:28 PM   #4
gxw
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks Irishbitte.

It's not ssh that's stopping me - as I'm also trying to login from the console and that fails too.

And yes, I have actually set up the server as a client but I realise that my test was overly complex. Subsequent test to ssh to testuser@client from client still prove unsuccsessful.
However, I have now noticed some error messages in /va/rlog/secure.

It seems the logins are being rejected by PAM! How do I get PAM to interface with LDAP or vice-versa?
 
Old 10-05-2009, 01:45 PM   #5
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
the pam_ldap module is what should be the case. depends on your distro! what are you running?
 
Old 10-05-2009, 09:07 PM   #6
hexahost
LQ Newbie
 
Registered: Oct 2008
Location: Chennai - INDIA
Distribution: CentOS
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by irishbitte View Post
the pam_ldap module is what should be the case. depends on your distro! what are you running?
run authconfig or system-config-authentication to use ldap authentication in your client.
 
Old 10-08-2009, 02:45 AM   #7
gxw
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Irishbite, I'm running RHEL5.
Hexahost, I did use system-config-authentication to configure both clients.

Actually I managed to get it working now. The breakthrough was finding this link below, ironically while looking for PAM info, but the PAM errors were a red herring, and the key was following the syntax carefully in the LDIF files included in this guy's openldap section:

http://www.openldap.org/lists/openld.../msg00097.html

I had been trying to use Posix parameters in the LDIF to identify my test user but ldapadd had been moaning about schemas which I thought were OK.
I think the key parameter was the following:

objectClass: posixAccount

That seems to allow the gidNumber and uidNumber parms to stick.

The PADL.com website also had some useful migration tools which take users from your passwd file and create LDIFs for you, although I was only setting this up to test so didn't use the tools.

I also think that forgetting the Group construct from my LDIF file probably didn't help either.

I'm glad I can move on now. I think I've learned way more about LDAP than I needed to, and I know I've only just scratched the surface!
 
Old 10-08-2009, 04:46 AM   #8
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
Yup, LDAP is incredibly powerful, great tool for managing user data on a website for example. As a basis for a directory server, it's excellent. I struggled with this a couple of years ago setting up an OpenLDAP authentication server. Great fun!
 
  


Reply



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
In Apache server, How to change log file location and log format for access log fil? since1993 Linux - Server 1 08-19-2009 04:14 PM
Can Samhain log my entries in /var/log/secure and /var/log/mesage to a central server abefroman Linux - Software 2 04-13-2008 04:13 PM
Opennms Logs - where are web.log, web_rtc.log and webauth.log referenced? not_much_of_a_guru Linux - Networking 0 07-12-2006 10:28 AM
sync ldap and samba password with ldappasswd paul_mat Linux - Networking 2 11-21-2005 10:55 PM

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

All times are GMT -5. The time now is 01:02 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