Hi! I joined a newly installed samba (4.20.1) server to a domain, - just testing things. Now I want to remove this test server from a domain, but I can't: root at svdcm2:/# samba-tool domain leave -U tls\\mjt-adm WARNING: Using passwords on command line is insecure. Installing the setproctitle python module will hide these from shortly after program start. Password for [TLS\mjt-adm]: ERROR(<class 'SystemError'>): uncaught exception - <method 'leave' of 'net_s3.Net' objects> returned a result with an exception set File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 285, in _run return self.run(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/samba/netcmd/domain/leave.py", line 59, in run s3_net.leave(keep_account) (all tools also display this out-of-context warning about using passwords on command line, which I don't do). How to remove this machine from a domain? Thanks, /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt
Op 20-06-2024 om 14:03 schreef Michael Tokarev via samba:> Hi! > > I joined a newly installed samba (4.20.1) server to a domain, - just > testing > things.? Now I want to remove this test server from a domain, but I > can't: > > > root at svdcm2:/# samba-tool domain leave -U tls\\mjt-adm > WARNING: Using passwords on command line is insecure. Installing the > setproctitle python module will hide these from shortly after program > start. > Password for [TLS\mjt-adm]: > ERROR(<class 'SystemError'>): uncaught exception - <method 'leave' of > 'net_s3.Net' objects> returned a result with an exception set > ? File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line > 285, in _run > ??? return self.run(*args, **kwargs) > ?????????? ^^^^^^^^^^^^^^^^^^^^^^^^^ > ? File "/usr/lib/python3/dist-packages/samba/netcmd/domain/leave.py", > line 59, in run > ??? s3_net.leave(keep_account) > > (all tools also display this out-of-context warning about using > passwords on command line, > which I don't do). > > How to remove this machine from a domain?I would just remove the computer-account on a DC...> > Thanks, > > /mjt >
20.06.2024 15:03, Michael Tokarev via samba ?????:> Hi! > > I joined a newly installed samba (4.20.1) server to a domain, - just testing > things.? Now I want to remove this test server from a domain, but I can't: > > > root at svdcm2:/# samba-tool domain leave -U tls\\mjt-adm > WARNING: Using passwords on command line is insecure. Installing the setproctitle python module will hide these from shortly after program start. > Password for [TLS\mjt-adm]: > ERROR(<class 'SystemError'>): uncaught exception - <method 'leave' of 'net_s3.Net' objects> returned a result with an exception set > ? File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 285, in _run > ??? return self.run(*args, **kwargs) > ?????????? ^^^^^^^^^^^^^^^^^^^^^^^^^ > ? File "/usr/lib/python3/dist-packages/samba/netcmd/domain/leave.py", line 59, in run > ??? s3_net.leave(keep_account) > > (all tools also display this out-of-context warning about using passwords on command line, > which I don't do). > > How to remove this machine from a domain?Okay, this was an operator error. samba-tool domain demote. With samba running on the server. Still, it'd be nice if samba-tool domain leave displayed some more appropriate error message, and no insecure-password-on-command-line warning is produced. Thanks, /mjt -- GPG Key transition (from rsa2048 to rsa4096) since 2024-04-24. New key: rsa4096/61AD3D98ECDF2C8E 9D8B E14E 3F2A 9DD7 9199 28F1 61AD 3D98 ECDF 2C8E Old key: rsa2048/457CE0A0804465C5 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 Transition statement: http://www.corpit.ru/mjt/gpg-transition-2024.txt
On 6/20/24 2:03 PM, Michael Tokarev via samba wrote:> How to remove this machine from a domain?net ads leave ... -slow -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature.asc Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20240620/954a9365/OpenPGP_signature.sig>