如何更改 SAMBA 服务器的 localSID?

如何更改 SAMBA 服务器的 localSID?

我正在尝试更改 SAMBA 服务器的 localSID,但无法更改。我尝试了“net setlocalsid”命令,但无济于事。为了排除故障,我还停止了 smbd 和 nmbd 服务,但这没有帮助。任何帮助都非常感谢!

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

答案1

一旦我将服务器置于备份域控制器模式,我就可以更改 sid。由于此服务器不需要是实际的域控制器,因此此模式很好。

server role = classic backup domain controller

希望这能帮助解决这个问题的任何人!!!

答案2

我遇到了同样的问题,在更改 HOST 的 netlocalsid 之前,我必须更改 LDAP 中 sambaDomainName=HOST 的 sambaSID。将 sambaSID 更改为要更改的值后,命令 # net setlocalsid 就可以正常工作了。

相关内容