On Thu, 20 Jun 2024 15:07:11 +0300
Michael Tokarev via samba <samba at lists.samba.org> wrote:
> 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.
That would imply that the 'server' was actually a DC and 'samba-tool
domain leave' is meant for removing a domain member from the domain.
I sometimes think it wasn't a good idea to fix the 'samba-tool domain
join member' command, it should have been removed.
>
> 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.
Agree with you about the error message, but you are the Debian Samba
maintainer, can you not make samba-tool dependant on the setproctitle
python module ?
Rowland