[Samba] userou= question
Robert Wooden
wdn2420systm at gmail.com
Sun Oct 11 11:42:08 UTC 2020
All is going well with samba-tool create [user] except for userou=USEROU.
In ADUC. My domain users ou are "down in the tree" further than the default
OU (used in samba-tool create [user] command.)
Like so:
ad.example.com (domain name)
|>> Users (default location "user create" puts entry)
|>> CompanyName
|>> Mmbr-folder-redirection (the ou I'd like to have
"user create" place new user entry)
I have tried "userou='Mmbr-folder-redirection'" and it fails with:
> root at dc1:~# samba-tool user create jean25 --given-name=Jean --initials=25
> --surname=Samba --uid-number=18700 --gid-number=10000 --profile-path=\\\\
> mbr04.ad.example.com\\profiles\\jean25 --home-drive=M
> --home-directory=\\\\mbr04.ad.example.com\\users\\jean25 *--userou=’OU=Mmbrs-folder-redirection’
> *--password=PASSWORD1
> New Password:
> Retype Password:
> ERROR(<class 'ValueError'>): Failed to add user 'jean25': - unable to
> parse dn string
> File "/usr/lib/python3/dist-packages/samba/netcmd/user.py", line 395, in
> run
> smartcard_required=smartcard_required)
> File "/usr/lib/python3/dist-packages/samba/samdb.py", line 528, in
> newuser
> ldbmessage2.dn = ldb.Dn(self, user_dn)
>
I have tried "userou='Mmbr-folder-redirection,OU='CompanyName'" and it
fails with:
> root at dc1:~# samba-tool user create jean25 --given-name=Jean --initials=25
> --surname=Samba --uid-number=18700 --gid-number=10000 --profile-path=\\\\
> mbr04.ad.example.com\\profiles\\jean25 --home-drive=M
> --home-directory=\\\\mbr04.ad.example.com\\users\\jean25
> *--userou=’OU=DmnMmbrs-folder-redirection,OU=CompanyName’*
> --password=PASSWORD1
> New Password:
> Retype Password:
> ERROR(<class 'ValueError'>): Failed to add user 'jean25': - unable to
> parse dn string
> File "/usr/lib/python3/dist-packages/samba/netcmd/user.py", line 395, in
> run
> smartcard_required=smartcard_required)
> File "/usr/lib/python3/dist-packages/samba/samdb.py", line 528, in
> newuser
> ldbmessage2.dn = ldb.Dn(self, user_dn)
>
Per samba-tool user create --help
> ....snipped....
>
Example3:
> samba-tool user create User3 passw3rd *--userou='OU=OrgUnit'*
>
....snipped....
>
--userou=USEROU DN of alternative location (
> *without domainDN counterpart*) to default
> CN=Users in which new user
> object will be created. E. g. 'OU=<OU name>'
>
....snipped....
>
I tried reversing the order "
*OU=CompanyName,OU=DmnMmbrs-folder-redirection*" in the create string and
got the same failure.
How is "userou=" intended to be configured?
More information about the samba
mailing list