1

=

I have three pcs :

  1. 192.168.0.70 dell has an ldap server
  2. 192.168.0.60 pb should be configured to connect to dell's ldap server
  3. 192.168.0.80 mac

if I ssh to pb with an ldap user account (here pduchesne) I will log to pb into pduchesne home dir, but with my own name :

romain@Mac:~$ ssh pduchesne@pb
pduchesne@pb's password:
Welcome to Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-53-generic x86_64)

romain@pb:~$ pwd
/home/users/pduchesne
romain@pb:~$ whoami
romain

Question

How can I connect and be changed for the pduchesne account / user ?

EDIT 1

Access log : I just disconnected from pb and reconnected from mac through ssh pduchesne@pb:

Jan 13 11:58:15 pb sshd[14130]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.0.80  user=pduchesne
Jan 13 11:58:15 pb sshd[14130]: Accepted password for pduchesne from 192.168.0.80 port 64369 ssh2
Jan 13 11:58:15 pb sshd[14130]: pam_unix(sshd:session): session opened for user pduchesne by (uid=0)
Jan 13 11:58:15 pb systemd-logind[18050]: New session 2084 of user romain.
Jan 13 11:58:15 pb sshd[14130]: pam_unix(sshd:session): session opened for user pduchesne by (uid=0)
Jan 13 11:58:17 pb sshd[14158]: Received disconnect from 192.168.0.80 port 64369:11: disconnected by user
Jan 13 11:58:17 pb sshd[14158]: Disconnected from 192.168.0.80 port 64369
Jan 13 11:58:17 pb sshd[14130]: pam_unix(sshd:session): session closed for user pduchesne
Jan 13 11:58:17 pb sshd[14130]: pam_unix(sshd:session): session closed for user pduchesne
Jan 13 11:58:17 pb systemd-logind[18050]: Removed session 2084.

Note

PS : This question follow another one, here : Impossible to connect with ldap

2
  • Can you attach LDAP server log and pb access log? Commented Jan 13, 2017 at 10:50
  • I am not sure where to find them :-/ Commented Jan 13, 2017 at 10:50

1 Answer 1

0

From your other question (Impossible to connect with ldap) i gather that you have set the uid of your user pduchesne to 1000 in LDAP and the local user account romain has also the uid 1000. So the mapping is wrong. You can verify that with:

getent passwd | grep 1000

in the output, both users should be shown with the same uid.

In principal its best to use higher uid numbers for users from ldap, to better distinguish them from local users and don't get such conflicts.

To resolve that you can change the uid of one of the users, its propaply best if you change it in LDAP.

2
  • hi, is there a way to tell ldap a minimum value for uids ? Commented Jan 18, 2017 at 12:25
  • @romainjouin it depends on how you create user accounts, so if you rely on phpldapadmin you can use the config option "auto_number" like: $servers->setValue('auto_number','min',array('uidNumber'=>10000,'gidNumber'=>10000));
    – moonhawk
    Commented Jan 18, 2017 at 16:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .