[Samba] [PATCH] samba-tool syntax error?

Marc Muehlfeld mmuehlfeld at samba.org
Tue Aug 5 12:44:16 MDT 2014


Hello David,

Am 05.08.2014 19:12, schrieb David Bear:
> I am using the following syntax to create a new user
> 
> samba-tool  user add   user  passwd  --userou=Faculty  --given-name=new
>  --surname=user  --gecos=198  --mail-address=newuser at myschool.edu
> 
> Which gives me the following error:
> 
> ERROR(<type 'exceptions.ValueError'>): Failed to add user 'user':  - unable
> to parse dn string
>   File "/home/vms/devbin/lib/python2.7/site-packages/samba/netcmd/user.py",
> line 176, in run
>     uid=uid, uidnumber=uid_number, gidnumber=gid_number, gecos=gecos,
> loginshell=login_shell)
>   File "/home/vms/devbin/lib/python2.7/site-packages/samba/samdb.py", line
> 407, in newuser
>     ldbmessage2.dn = ldb.Dn(self, user_dn)
> 
> Since it didn't detect a syntax error, I assume there is something worse..
> But I don't really know why it would fail to parse the dn string --



The usage is --userou='ou=testOU'
                      ^^^^^


# samba-tool user add demoB demopass --userou='ou=testOU'
--given-name=new --surname=user  --gecos=198
--mail-address=newuser at myschool.edu
User 'demoB' created successfully



Attached a small patch, that hopefully makes the example in the help a
bit clearer. Please review and push, if it's OK.


Regards,
Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Redescribe-userou-usage.patch
Type: text/x-patch
Size: 1699 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba/attachments/20140805/97be7af0/attachment.bin>


More information about the samba mailing list