[Samba] Question regarding samba-tool

Rowland penny rpenny at samba.org
Sat Feb 13 19:07:01 UTC 2021


On 13/02/2021 18:31, Anders Östling wrote:
>
> *Anders Östling*
> *
> *
> Dämmegatan 11
> SE-25442 Helsingborg
> Sweden
> Phone: +46 768 716 165
> Skype: anders.ostling at outlook.com
>
> On 13 Feb 2021, 10:46 +0100, Rowland penny via samba 
> <samba at lists.samba.org>, wrote:
>
>     On 13/02/2021 09:02, Anders Östling via samba wrote:
>
>         Hi
>
>         I am creating scripts for batch loading of users and groups
>         into Samba AD, but have a problem with non-existing options. I
>         am still on 4.9.5 (Debian 10). According to the Wiki, there
>         are options for OU and other attributes that don’t work for me.
>
>         If that is caused by me having a too old Samba, maybe it would
>         be a good idea to update the Wiki with “Requires at least
>         version X.X.X” for options that has been added recently.
>
>
>
>     By recently, do you mean something like 5 minor versions before
>     yours ?
>
>
>     The samba-tool 'OU' commands were added at 4.9.0 , so you should have
>
>     them. What does 'samba-tool user create --help' return ? Does it show
>
>     '--userou=USEROU' ?
>
>
> Yes, the option is shown in the help output
>
>
>     If it does try your command like this:
>
>
>     samba-tool user create bengt changePwd0 --surname=Swedin
>
>     --given-name=Bengt --userou='OU=Konton' -script-path=netlogon.cmd
>
>     --profile-path='\\DC2-HPLTS\profiles\bengt' --home-drive=U
>
>     --home-directory='\\FS1-HPLTS\bengt'
>
>
>     Just a thought, does the 'Konton' OU exist ?
>
>
>
> For sure, I have two test accounts in that OU already
>
> I did some more tests. First I used just “samba-tool user create 
> bengt”, and that worked (prompted for password)
>
> Next: Manual edit of “givenName: Bengt"
>
> root at dc2-hplts:/home/sysman# samba-tool user edit bengt
> Modified User 'bengt' successfully
>
> Next manuall edit of “surName: Swedin"
>
> This fails with
>
> root at dc2-hplts:/home/sysman# samba-tool user edit bengt
> ERROR(ldb): Failed to modify user 'bengt':  - objectclass_attrs: 
> attribute 'surName' on entry 
> 'CN=bengt,CN=Users,DC=hoganas-platslagaren,DC=se' was not found in the 
> schema!
>
> (tried the same with lowercase ’surname’ too, same error)


It would, try 'sn: Swedin'

Rowland





More information about the samba mailing list