[PATCH] samba-tool syntax error?
repenny241155 at gmail.com
Tue Aug 5 12:57:25 MDT 2014
On 05/08/14 19:44, Marc Muehlfeld wrote:
> 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,
>> 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.
Marc, that is better but, in my opinion (for what it is worth) it makes
it a bit worse
help="Alternative location (without domainDN counterpart, but with
'OU=OrgUnit') to default CN=Users in which new user object will be created",
help="DN of Alternative location (without domainDN counterpart) to
default CN=Users in which new user object will be created i.e. 'OU=<OU
The way you have it, somebody is bound to use 'OU=OrgUnit' and then
complain when it doesn't work ;-)
to default CN=Users in which new user object will be created i.e. ",
More information about the samba-technical