[Samba] Unable to use samba-tool

Rowland Penny rowlandpenny241155 at gmail.com
Tue Nov 10 11:37:27 UTC 2015


On 10/11/15 10:49, edward torvalds wrote:
> I having trouble with use samba-tool command. It just does not works. I
> need help with troubleshooting
>
> Commands I have tried:
>
> sudo samba-tool user create edward
> New Password:
> Retype Password:
> ERROR(<type 'exceptions.ValueError'>): Failed to add user 'edward':  -
> unable to parse dn string
>    File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line
> 176, in run
>      uid=uid, uidnumber=uid_number, gidnumber=gid_number, gecos=gecos,
> loginshell=login_shell)
>    File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 343, in
> newuser
>      dnsdomain = ldb.Dn(self,
> self.domain_dn()).canonical_str().replace("/", "")
>
> ----------------------------------------------
>
> samba-tool user list
> ltdb: tdb(/var/lib/samba/private/sam.ldb): tdb_open_ex: could not open
> file /var/lib/samba/private/sam.ldb: Permission denied
>
> Unable to open tdb '/var/lib/samba/private/sam.ldb': Permission denied
> Failed to connect to 'tdb:///var/lib/samba/private/sam.ldb' with
> backend 'tdb': Unable to open tdb '/var/lib/samba/private/sam.ldb':
> Permission denied
> ERROR(ldb): uncaught exception - Unable to open tdb
> '/var/lib/samba/private/sam.ldb': Permission denied
>    File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py",
> line 175, in _run
>      return self.run(*args, **kwargs)
>    File "/usr/lib/python2.7/dist-packages/samba/netcmd/user.py", line
> 265, in run
>      credentials=creds, lp=lp)
>    File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 56, in
> __init__
>      options=options)
>    File "/usr/lib/python2.7/dist-packages/samba/__init__.py", line 114,
> in __init__
>      self.connect(url, flags, options)
>    File "/usr/lib/python2.7/dist-packages/samba/samdb.py", line 71, in
> connect
>      options=options)
>
>
> I don't know where to start troubleshooting from.
> Thanks

Where are you trying to create the user, on the DC or a domain member?

Rowland




More information about the samba mailing list