[Samba] remote name change & machine account creation (Bug ?)

Pierre Dinh-van pierre at tuxfamily.org
Fri Sep 17 14:58:32 GMT 2004


Hello,

Before all, in advance, I'm sorry for my bad english.

I'm trying to automate the join of new computers (running Windows XP Pro) to 
my Samba (3.0.7) domain by using a unique ghost image and a windows sysprep 
"script" that retrieve the real name of the machine and try to join the 
domain with this name.

It works well while trying to join a w2k domain, but with my Samba domain, 
smbd tries to create a machine account on the OpenLDAP with the old name of 
the computer (the name which is on the ghost image, so the same name for all 
the computers...) in place of the name assigned by sysprep.

After sniffing the network traffic with tcpdump, it seems that the new name of 
the client is really sent to the samba server, but it doesn't use it.

I first thought it was a problem of nmbd, so I tried to set "name cache 
timeout = 0" in my smbd.conf, but it doesn't changed anything. (I tried it 
with 3.0.4, not with 3.0.7, but I don't want to run my prod server without 
name caching...)

Finally, I looked in the samba source code, and I found a function named 
set_remote_machine_name() (in lib/substitute.c) which might be the reason of
my problem...

It's the first time I take a look into the samba source code, and I don't 
understand well how it works, but the param "perm" of this function seems to 
define if smbd must look (or not) for the realname of the computer. 

The only call of set_remote_machine_name() that I found which defines perm as 
True is in auth/auth_ntlmssp.c. 

set_remote_machine_name(auth_ntlmssp_state->ntlmssp_state->workstation, True);

But I don't dare to change it as False because I don't understand what sort of 
problems it could generate...


Can somebody confirm me that I'm looking in the right way ?
Is there a solution to make it work at the time ?


Thanks in advance

-- 
Pierre Dinh-van


More information about the samba mailing list