openldap and openssh

Hi all,

I have an openldap server and a solaris 10 client.

I can connect on this solaris 10 client with two accounts

(bruno and toto) : a /etc/passwd account (toto) and an openldap

account (bruno).

I store the SAME publickeys in the .ssh repositories

of the two accounts :

[buster.root:13] ls -al /home/bruno/.ssh/

-rw-r--r--1 brunotechniq209 nov 16 17:23 authorized_keys

-rw-1 brunotechniq883 nov 16 17:23 id_rsa

-rw-r--r--1 brunotechniq231 nov 16 17:23 known_hosts

[buster.root:14] ls -al /home/toto/.ssh/

-rw-r--r--1 totoother209 nov 16 17:38 authorized_keys

-rw-1 totoother883 nov 16 17:38 id_rsa

-rw-r--r--1 totoother231 nov 16 17:38 known_hosts

However when I try to connect from an account which has the

same keys, I only succeed with the /etc/passwd account (toto) while

the client systematically rejects my connection for the openldap

account (bruno).

sshd -ddd shows :

debug1: do_pam_account: called

debug3: mm_request_receive entering

debug3: PAM: do_pam_account pam_acct_mgmt = 9 (Authentication failed)

debug3: mm_request_send entering: type 47

Failed publickey for bruno from xxx.xxx.xxx.xxx port 33153 ssh2

debug3: mm_request_receive entering

debug3: mm_do_pam_account returning 0

Access denied for user bruno by PAM account configuration

Any idea of what is wrong ?

perhaps my pam.conf should be adapted to allow connection

with publickeys and openldap ?

thanks in advance for any tip.

Bruno

[1981 byte] By [bruno404] at [2007-11-25 22:41:38]
# 1

Related post:

<a href="http://supportforum.sun.com/sjes/index.php?t=msg&amp;th=289&amp;s tart=0&amp;rid=11391&amp;SQ=72fe8be036fe58b5658cd7a212d0fb82" target="_blank"> http://supportforum.sun.com/sjes/index.php?t=msg&th=289& amp;start=0&rid=11391&SQ=72fe8be036fe58b5658cd7a212d 0fb82</a>

Gary

GaryTay at 2007-7-5 14:18:56 > top of Java-index,General,Sun Networking Services and Protocols...
# 2

Hi Gary,

Thanks for your answer.

You wrote :

> OpenSSH does not support LDAP based public-key right out of the box.

>

> You have two solutions:

>

> 1) On top of LDAP, create duplicate /etc/passwd files based user with the

> same uidNumber and gidNumber. (tried and worked).

>

> 2) Install OpenSSH LDAP Public Key Patch (never tried)

>

> <a href="http://www.opendarwin.org/projects/openssh-lpk/" target="_blank">http://www.opendarwin.org/projects/openssh-lpk/</a>

>

> Gary

What do you mean by "On top of LDAP" ?

Is it on the master openldap server ?

Bruno

bruno404 at 2007-7-5 14:18:56 > top of Java-index,General,Sun Networking Services and Protocols...
# 3

In your case, that means the account "bruno" will appear in BOTH /etc/passwd (/etc/shadow) as well as LDAP DIT.

They may or may not have the same password, you may run "passwd -r files" to define local files passwd and "passwd -r ldap" to define LDAP DIT password, it is better to set them the same.

Gary

GaryTay at 2007-7-5 14:18:56 > top of Java-index,General,Sun Networking Services and Protocols...
# 4
Thanks again Gary
bruno404 at 2007-7-5 14:18:56 > top of Java-index,General,Sun Networking Services and Protocols...