[Samba] Strange Usermapping problem with 3.0.23b

Gerald (Jerry) Carter jerry at samba.org
Tue Aug 29 16:21:18 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthias Schuendehuette wrote:

> My Samba-Server is member of a large ADS-Domain. 
> After the upgrade, file based Usermapping didn't
> work anymore... better: it worked TWICE. (I
> once opened a PR for that a few years ago :-). 
> So, with LogLevel 3:
> 
> <DOMAIN>\<WinUser> is mapped to <UnixUser>
> <DOMAIN>\<UnixUser> is mapped to <DefaultUser>
> 
> (I have a line "<DefaultUser> = *" in my 'smbusers.map'-file)

I just fixed this for 3.0.23c.

> If I use its IP-Address, usermapping happens ONCE 
> (i.e. correctly).

It's dependent on whether the session setup used Krb5
or NTLM.

> Any Ideas anybody? Some other test to narrow he error 
> down? I'm willing to cooperate as much as possible, the
> Samba-Server has >100 productive users...

I've attached the patch that is included for 3.0.23c.





cheer,s jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE9Gl9IR7qMdg1EfYRAoeNAJ95UShk2wK0BoIYxHF+aCEUNZA35wCeNcvJ
uThSW6mb+DJ6eE0iapYf3iE=
=hQJ8
-----END PGP SIGNATURE-----
-------------- next part --------------
Index: smbd/sesssetup.c
===================================================================
--- smbd/sesssetup.c	(revision 17908)
+++ smbd/sesssetup.c	(working copy)
@@ -320,10 +320,14 @@
 	
 	sub_set_smb_name( real_username );
 	reload_services(True);
+
 	if ( map_domainuser_to_guest ) {
 		make_server_info_guest(&server_info);
 	} else if (logon_info) {
-		ret = make_server_info_info3(mem_ctx, real_username, domain, 
+		/* pass the unmapped username here since map_username() 
+		   will be called again from inside make_server_info_info3() */
+		
+		ret = make_server_info_info3(mem_ctx, user, domain, 
 					     &server_info, &logon_info->info3);
 		if ( !NT_STATUS_IS_OK(ret) ) {
 			DEBUG(1,("make_server_info_info3 failed: %s!\n",


More information about the samba mailing list