[Samba] samba-tool user add - weird resulting
Franta Hanzlik
franta at hanzlici.cz
Wed Aug 14 10:51:45 UTC 2024
Dne 2024.08.14 12:06, Rowland Penny via samba napsal:
> On Wed, 14 Aug 2024 11:05:23 +0200
> Franta Hanzlik via samba <samba at lists.samba.org> wrote:
>
>> Rowland, thank you for response.
>> But I still think there's nothing stopping Samba from being better
>> than Windows at this, and introducing some switches like
>> --displayname
>> --commonname
>> --name
>> --exclude-initials-in-dn
>> or something similar.
>>
>> After all, what are the various attributes displayName/cn/name for, if
>> they cannot be entered when creating a user.
>>
>
> OK, the 'commonname' or 'cn' is also part of the users 'dn' or RDN and
> the 'name' must also be the same as the 'cn'. You can use whatever you
> like for the 'username' when creating a user, but whatever is used will
> also populate the 'cn', 'name', 'sAMAccountName' and
> 'distinguishedName' attributes.
Now I see that 'samba-tool user rename' allows to change the displayname
and initials as well - so the 'samba-user add' without initials a
subsequential
'samba-user rename' command with initials and displayname mostly solves
that.
The error may also be my understanding of the concept of initials - this
can obviously differ between nations/states when multiple names are used,
and I am in the grip of our Czech interpretation - in our country only
the first name (=given name) and the surname are common, nothing else.
And the initials are then the first letter of the first name and the first
letter of the surname - so my initials are FH.
That's why it seemed pointless to have cn / displayname / name
"Franta FH Hanzlik" ;)
> You can also use the '--use-username-as-cn' to force the use of the
> username for the 'cn' (and hence the other attributes).
>
> There is nothing stopping you writing your own script around
> 'samba-tool user add' to first create the user (using samba-tool) and
> then modify it to your purposes, though I struggle to understand why
> you would want to.
Yes, I did this, thanks.
> Rowland
--
Franta Hanzlik
More information about the samba
mailing list