Samba – How to change the localSID for a SAMBA Server

sambasamba4

I am trying to change the localSID for a SAMBA server, however I am unable to. I have tried the command "net setlocalsid" to no avail. To troubleshoot I have also stopped the smbd and nmbd services, but this did not help. Any help would be great!

root@TheWiggle:~# net getlocalsid
SID for domain THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# net getdomainsid
SID for local machine THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000
SID for domain THISDOMAIN is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# net setlocalsid S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net getlocalsid
SID for domain THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# net getdomainsid
SID for local machine THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000
SID for domain THISDOMAIN is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# net setdomainsid S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net getdomainsid
SID for local machine THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000
SID for domain THISDOMAIN is: S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net setlocalsid S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net getlocalsid
SID for domain THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# service smbd stop && service nmbd stop
smbd stop/waiting
nmbd stop/waiting

root@TheWiggle:~# net setlocalsid S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net getlocalsid
SID for domain THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000

root@TheWiggle:~# net setdomainsid S-1-5-21-33300351-1172445578-3061011111

root@TheWiggle:~# net getdomainsid
SID for local machine THEWIGGLE is: S-1-5-21-748580849-194208185-3916830000
SID for domain THISDOMAIN is: S-1-5-21-33300351-1172445578-3061011111

Best Answer

I was able to change the sid once I put the server in a backup domain controller mode. Since this server does not need to be an actual domain controller this mode was fine.

server role = classic backup domain controller

Hopefully this helps anyone with this issue!!!