ldap+samba+gdm trouble

I'm having troubles setting up a client(with Ubuntu 8.10) for a ldap+samba server. I can't authenticate through the client with gdm, the messages I have in /etc/auth.log at the client is

Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1: Invalid credentials
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: could not connect to any LDAP server as cn=administrator,dc=foo,dc=com - Can't contact LDAP server
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldapi:///192.168.0.1: Can't contact LDAP server
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1/: Invalid credentials
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: could not search LDAP server - Server is unavailable
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: pam_unix(gdm:auth): check pass; user unknown
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: pam_unix(gdm:auth): authentication failure; logname= uid=0 euid=0 tty=:20 ruser= rhost=
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1: Invalid credentials
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: could not connect to any LDAP server as cn=administrator,dc=foo,dc=com - Can't contact LDAP server
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldapi:///192.168.0.1: Can't contact LDAP server
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1/: Invalid credentials
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: nss_ldap: could not search LDAP server - Server is unavailable
Dec 4 14:21:56 myuser-mydesktop gdm[14815]: gkr-pam: error looking up user information

But
finger ldapuser
getent passwd | grep ldapuser
both works fine and

    pamtest passwd ldapuser
    Trying to authenticate ldapuser for service passwd.
    Password:******
    Authentication successful.
    
    pamtest login ldapuser
    Trying to authenticate ldapuser for service login.
    Password:******
    Authentication successful

Any help would be appreciated!

Is gdm running as root? This might be necessary. Or it must be in the same group that has access to whatever pam configuration file is used.

gdm is running with right permissions, the major problem is that it can't validate credentials although distinguished name is fine

gdm[14815]: nss_ldap: failed to bind to LDAP server ldap://192.168.0.1/: Invalid credentials

any help with that?

In your log, you used something called pamtest but it's not clear if you provided the password manually. If you did, that means you have to specify the password somewhere.

That's because, the LDAP client needs to authenticate itself against the server. It must do so with a username and password. This username and password are sometimes provided in the pam_ldap configuration file (depending on the specific PAM configuration). it might also be in the /etc/ldap.conf file (depending on the LDAP vendor).

pamtest doesn't appear on the log file, I write the ouput of their execution.
As the pamtest manual says:

So I can athenticate through PAM...
Gdm is an interactive login (by default beside you can change that), so the username and password are entered that way.. the problem is that it only recognizes local users, no one from the server who has ldap service running

No one outside the "local" server can authenticate against LDAP?? But gdm is trying to reach the LOCAL ldap server. Are you running LDAP locally or on another server? If the second answer, then again, check the LDAP config.