Reignfire |
01-11-2013 07:08 AM |
ldap client via ssh won't work
Hi,
I'm trying to make my server work with accounts on my ldap but i can't seem to make a connection with the server. So that if i ssh into the server i can use my ldap-account.
I'm running Debian squeeze on the client, the ldap server is still a Debian lenny that has been set up a few years ago by a friend.
This is the /var/log/auth error i got:
Code:
Jan 11 13:45:39 server1 nscd: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server krbtgt/servername not found in Kerberos database)
Jan 11 13:45:39 server1 nscd: nss_ldap: failed to bind to LDAP server ldap://<ip ldap server>: Local error
Jan 11 13:45:39 server1 nscd: nss_ldap: could not search LDAP server - Server is unavailable
When i do nmap -p 389 <ip ldap server> i get this:
PORT STATE SERVICE
389/tcp open ldap
/etc/ssh/sshd_config
Code:
# Package generated configuration file
# See the sshd_config(5) manpage for details
# What ports, IPs and protocols we listen for
Port 4800
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
AllowUsers root user1 guest
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication yes
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
# GSSAPI options
#GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
/etc/pam.d/common-account
Code:
account [default=bad user_unknown=ignore success=ok authinfo_unavail=ignore] pam_ldap.so
account required pam_unix.so
/etc/pam.d/common-auth
Code:
auth required pam_env.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so
/etc/pam.d/common-password
Code:
password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 try_first_pass retry=3
password sufficient pam_unix.so try_first_pass use_authtok nullok md5 shadow
password sufficient pam_ldap.so use_authtok use_first_pass
password required pam_deny.so
/etc/pam.d/common-session
Code:
session required pam_limits.so
session required pam_unix.so
session optional pam_ldap.so
session optional pam_mkhomedir.so
/etc/ldap/ldap.conf
Code:
uri ldap://<ip ldap server>
base dc=<part1>,dc=<part2>,dc=<part3>
pam_filter objectclass=posixAccount
pam_login_attribute uid
pam_member_attribute memberuid
nss_base_passwd cd=<part1>,dc=<part2>,dc=<part3>
nss_base_shadow cd=<part1>,dc=<part2>,dc=<part3>
nss_base_group cd=<part1>,dc=<part2>,dc=<part3>
scope one
timelimit 10
bind_timelimit 10
bind_policy soft
Can somebody see any mistakes or have some idea's to try and fix it :)
Kind regards
|