[Samba] tdbedit imports from smbpasswd ok but sets domain value as old domain

Kevin Bailey kbailey at freewayprojects.com
Tue May 1 12:27:01 GMT 2007


I tried to send this before but it might need re-sending...


Hi,

Just found this out - is it a bug which I should register or is this by design?

We had been running a Samba 2.2 server for a few years with a domain called PSCT 
- everybody very happy (well done guys!).  Installed a new server with Samba 3 
based on Debian Etch.  The new server was set as the domain PSCT2 to keep things 
clear.

Copied all data across to the new server. 

The new server has a tdbsam back end - and the accounts from the old server were 
imported using tdbedit (see man tdbedit).  So tdbedit was used to 
import the records from the smbpasswd file from the old server.

What happened was that the user accounts in the tdbsam database were set up with 
the old PSCT as the value for domain and not the domain of the new server which is PSCT2.  And 
tdbedit can not be used to change the Domain value.

The users logons would still work - but

but - when users logged on they would not pick up the NTConfig.POL file and load it.

What I had to do was to use smbpasswd to delete each account individually and 
then re-add them.  It would then show that the acounts were now created with the 
PSCT2 domain value.

And NTConfig.POL would then be picked up.

(BTW - I used smbpasswd and not tdbedit to delete/add the accounts as using 
smbpasswd seemed to keep the original UID at the end of the SID.  Maybe it was 
picking up something from /etc/passwd. This helped because it meant the users 
used the same local profile on their PC's as when they first logged on to the 
new server/domain.  BTW - profiles are not used).

Is this something I should register as a bug or is it by design?

Kevin
**




More information about the samba mailing list