Unable to login as admin with SSH

#1

Hello.

I cannot log in under ssh with the admin account.
But:

  • no problem with root
  • no problem to log in as administrator on the web

As advised by @kload on the chat room, I checked /etc/ssh/sshd_config against https://github.com/YunoHost/packages/blob/master/yunohost-config-others/config/others/sshd_config
but there is no major difference. Most important: UsePAM yes

I checked /var/log/syslog:

Dec 22 19:24:13 bibi slapd[2606]: conn=1031 op=42 SRCH base=“dc=yunohost,dc=org” scope=2 deref=0 filter="(&(objectClass=posixAccount)(uid=admin))"
Dec 22 19:24:13 bibi slapd[2606]: conn=1031 op=42 SRCH attr=loginShell cn gidNumber uidNumber objectClass homeDirectory gecos uid
Dec 22 19:24:13 bibi slapd[2606]: conn=1031 op=42 SEARCH RESULT tag=101 err=0 nentries=1 text=

So:

  • the LDAP is accessed by ssh
  • nentries=1 tells that the user admin exists

Deadly seems there is an issue with the pw. But it is simple, uppercase, QWERTY-AZERTY compatible… No mistake.

My configuration is a manual Yunohost install on a Bananian Linux, on a Banana Pi.

Thanks in advance for your help.

SSH disconnects after successful login
#2

Try to change the “UsePAM” value

#3

Thanks @kload for your answer.

In /etc/ssh/sshd_config had UsePAM yes

So, I set it to “no”. Of course : in syslog, I could see that the LDAP is no more accessed on login.

Then, back to UsePAM yes

Still fail to login admin in ssh.

I checked the password:

ldapwhoami -H ldap://localhost:389 -x -D cn=admin,dc=yunohost,dc=org -W

And I got:

Enter LDAP Password:
dn:cn=admin,dc=yunohost,dc=org

No errror message: it’s OK for the password.

The trouble seems in between ssh and ldap…

I also tried to replace /etc/ssh/sshd_config

by https://github.com/YunoHost/packages/blob/master/yunohost-config-others/config/others/sshd_config

No result.

Authentification PAM?
#4

Can you try to install libpam-ldapd ?

1 Like
#5

Yes!!!

Done.

Bravo, @kload, et encore merci.