[Samba] NetBIOS Hostname

John H Terpstra
Fri, 30 May 2008 19:14:28 -0000

On Friday 30 May 2008 12:54:33 William W. Hammond wrote:
> I was setting up Samba on an OpenSuSE 10.3 i386 computer.
>
> At the last minute I decided to enter a NetBIOS Hostname, big mistake.
> A message popped up warning me that entering a NetBIOS Hostname would
> create a new UID and Clients may no longer be able to connect.
> The Message was correct....
>
> However, (Design Flaw) at that point there was no way for me to back out or
> cancel, so the deed was done.

The issue is not whether or not Samba has a NetBIOS name, but rather that a
change of the NetBIOS name will generate a new SID for the system.  If that
system is a PDC, you will end up with a new Domain SID, and hence your
Windows clients will no longer belong to the same domain your PDC is now in.

> How or where do you remove or change that option...?

You can find out the original domain SID from your Samba log files
in /var/log/samba.  Then reset the domain SID using:
	a) Stop Samba
	b) Execute: net setlocalsid "S-1-5-21-xxxxxxxx-xxxxxx-xxxxxxx"
	c) Restart Samba

That should restore things so long as you have not messed around with things
too much, in which case it would be easier to rejoin your Windows clients to
the current Samba domain setup.

PS: By default Samba finds the hostname of the system it is running on and
uses that to generate the machine SID (and the domain SID if it is a PDC).

- John T.