pdb_getsampwrid Failure.

KFuerstberger at haitec.de KFuerstberger at haitec.de
Fri Oct 26 01:13:06 GMT 2001


Hai,

This Patch from Ignacio Coupeau works for me:

http://www.unav.es/cti/ldap-smb/ldap-smb-2_2-howto.html

-----------------------
smbtest:~/samba-cvs/samba/source/passdb# diff -u pdb_ldap.c.PATCHED
pdb_ldap.c.DIST
--- pdb_ldap.c.PATCHED  Wed Oct 24 16:49:37 2001
+++ pdb_ldap.c.DIST     Mon Oct 22 15:29:34 2001
@@ -577,11 +577,9 @@
        make_a_mod(mods, ldap_state, "description",
pdb_get_acct_desc(sampass));
        make_a_mod(mods, ldap_state, "userWorkstations",
pdb_get_workstations(sampass));

-       if ( !sampass->user_rid) sampass->user_rid =
pdb_uid_to_user_rid(pdb_get_uid(sampass));
        slprintf(temp, sizeof(temp) - 1, "%i", sampass->user_rid);
        make_a_mod(mods, ldap_state, "rid", temp);

-       if ( !sampass->group_rid) sampass->group_rid =
pdb_gid_to_group_rid(pdb_get_gid(sampass));
        slprintf(temp, sizeof(temp) - 1, "%i", sampass->group_rid);
        make_a_mod(mods, ldap_state, "primaryGroupID", temp);
-----------------------

Now, when you smpasswd add a machine the rid is calculated from the uid/gid
and set in the LDAP database.

Klaus

> I'm having trouble joining a Win2k pro machine to a Samba 2.2.2 domain
> with a LDAP backend.  I have a user add script defined which is working.
>  I can also logon to the Samba via root. When try to add the domain I
> use root as the admin login and I get the following message on the Win2k
> machine. "The specified user does not exist."  And here is the last two
> log messages in the samba log for the machine.
>
> [2001/10/23 16:33:00, 0, effective(0, 0), real(0, 0)]
> passdb/pdb_ldap.c:pdb_getsampwrid(750)  We don't find this rid [1400]
> count=0
> [2001/10/23 16:33:01, 2, effective(0, 0), real(0, 0)]
> smbd/server.c:exit_server(458)  Closing connections
>
> It seems to be looking for a RID of 1400.  Why would it be doing that?
>  I believe that this call is what is causing the domain joining to fail.





More information about the samba-ntdom mailing list