I have a CentOS configured with Samba and Winbind for file shares which works fine. In order for domain user to login to the linux box I did configure /etc/pam.d/sshd file. However every time I try to login with domain user it connects and shows the standard message "Last login: ..." and then disconnects by displaying message "Connection to the SERVER-NAME is closed."
Also, it did ask to manually create the /home/DOMAIN/ directory else it gives this message
"Last login: Tue Feb 28 16:30:45 2012 from x.x.x.x
Could not chdir to home directory /home/DOMAIN/USER: No such file or directory
Connection to SERVER closed."
The /etc/pam.d/sshd looks like this:
auth sufficient pam_winbind.so
auth required pam_nologin.so
auth include system-auth
account sufficient pam_winbind.so
account include system-auth
session include system-auth
password include system-auth
Following is the message at /var/log/secure (disregarding the break-in attempt part)
Feb 28 16:44:55 file3 sshd: reverse mapping checking getaddrinfo for machinename.domain.com failed - POSSIBLE BREAK-IN ATTEMPT!
Feb 28 16:44:59 file3 sshd: pam_winbind(sshd:auth): getting password (0x00000000)
Feb 28 16:44:59 file3 sshd: pam_winbind(sshd:auth): user 'DOMAIN+User' granted access
Feb 28 16:44:59 file3 sshd: pam_winbind(sshd:account): user 'DOMAIN+User' granted access
Feb 28 16:44:59 file3 sshd: Accepted password for DOMAIN+User from x.x.x.x port 44240 ssh2
Feb 28 16:44:59 file3 sshd: pam_unix(sshd:session): session opened for user DOMAIN+User by (uid=0)
Feb 28 16:44:59 file3 sshd: Received disconnect from x.x.x.x: 11: disconnected by user
Feb 28 16:44:59 file3 sshd: pam_unix(sshd:session): session closed for user DOMAIN+User
I have also added the group in sudoers list that will be accessing this machine.
Please can anyone assist me here to make ssh work for domain user.
Thanks in advance!