Mario Codeniera
2020-Feb-26 00:56 UTC
[Samba] samba-tool to list users of the trust domain
It seems to generate an error 'No such file or directory' if I put -H
option.
samba-tool user list -H main-dc1.sandbox.net
ltdb: tdb(/var/lib/samba/private/main-dc1.sandbox.net): tdb_open_ex: could
not open file /var/lib/samba/private/main-dc1.sandbox.net: No such file or
directory
Unable to open tdb '/var/lib/samba/private/main-dc1.sandbox.net': No
such
file or directory
Failed to connect to '/var/lib/samba/private/main-dc1.sandbox.net' with
backend 'tdb': Unable to open tdb '/var/lib/samba/private/
main-dc1.sandbox.net': No such file or directory
ERROR(ldb): uncaught exception - Unable to open tdb '/var/lib/samba/private/
main-dc1.sandbox.net': No such file or directory
File "/usr/lib64/python3.6/site-packages/samba/netcmd/__init__.py",
line
186, in _run
return self.run(*args, **kwargs)
File "/usr/lib64/python3.6/site-packages/samba/netcmd/user.py", line
535,
in run
credentials=creds, lp=lp)
File "/usr/lib64/python3.6/site-packages/samba/samdb.py", line 67,
in
__init__
options=options)
File "/usr/lib64/python3.6/site-packages/samba/__init__.py", line
115, in
__init__
self.connect(url, flags, options)
File "/usr/lib64/python3.6/site-packages/samba/samdb.py", line 82,
in
connect
options=options)
On Fri, Feb 21, 2020 at 2:09 PM Andrew Bartlett <abartlet at samba.org>
wrote:
> On Fri, 2020-02-21 at 14:00 +1300, Mario Codeniera via samba wrote:
> > Hi,
> >
> > Is it possible to display the users of the trust domain using samba-
> > tool?
> >
> > I tried however it only display on the current AD users or other any
> > other
> > hidden argument to use?
> > samba-tool user list
>
> You can point it an any other DC using the -H option to specify an LDAP
> URL. It will then list the users on the domain that DC is part of.
>
> Andrew Bartlett
> --
> Andrew Bartlett
> https://samba.org/~abartlet/
> Authentication Developer, Samba Team https://samba.org
> Samba Development and Support, Catalyst IT - Expert Open Source
> Solutions
> https://catalyst.net.nz/services/samba
>
>
>
>
>
>
>
Andrew Bartlett
2020-Feb-26 01:01 UTC
[Samba] samba-tool to list users of the trust domain
On Wed, 2020-02-26 at 13:56 +1300, Mario Codeniera wrote:> It seems to generate an error 'No such file or directory' if I put -H > option.-H ldap://$SERVER -H takes an LDAP URI, otherwise it assumes a file path. Andrew Bartlett -- Andrew Bartlett https://samba.org/~abartlet/ Authentication Developer, Samba Team https://samba.org Samba Development and Support, Catalyst IT - Expert Open Source Solutions https://catalyst.net.nz/services/samba
Mario Codeniera
2020-Feb-26 01:15 UTC
[Samba] samba-tool to list users of the trust domain
Thanks Andrew, however there's an LDAP error. There are so heaps of users
on our main AD.
I put -U and using an account on the main AD.
ERROR(ldb): uncaught exception - LDAP error 4 LDAP_SIZE_LIMIT_EXCEEDED -
<> <>
File "/usr/lib64/python3.6/site-packages/samba/netcmd/__init__.py",
line
186, in _run
return self.run(*args, **kwargs)
File "/usr/lib64/python3.6/site-packages/samba/netcmd/user.py", line
541,
in run
attrs=["samaccountname"])
On Wed, Feb 26, 2020 at 2:01 PM Andrew Bartlett <abartlet at samba.org>
wrote:
> On Wed, 2020-02-26 at 13:56 +1300, Mario Codeniera wrote:
> > It seems to generate an error 'No such file or directory' if I
put -H
> > option.
>
> -H ldap://$SERVER
>
> -H takes an LDAP URI, otherwise it assumes a file path.
>
> Andrew Bartlett
> --
> Andrew Bartlett
> https://samba.org/~abartlet/
> Authentication Developer, Samba Team https://samba.org
> Samba Development and Support, Catalyst IT - Expert Open Source
> Solutions
> https://catalyst.net.nz/services/samba
>
>
>
>
>
>
>