[Samba] samba-tool user add - weird resulting
Franta Hanzlik
franta at hanzlici.cz
Thu Aug 15 14:33:57 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.
>
> 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.
>
> Rowland
--
The problem is the initials.
If I understand their meaning and role correctly, initials are the first
letters of the full user's name (first, middle, last name,..) - and what
is important, they are/should be a separate element, not part of other
forms of the name.
Just like is the 'United States' and is its abbreviation 'US', but the term
'United US States' is nonsense.
Or, for example, my name is 'Franta Hanzlik', I have the initials 'FH',
but the expression 'Franta FH Hanzlik' is nonsense.
And this is how entering initials using 'samba-tool user add' / 'samba-tool
user rename' behaves badly: when I enter them in user add, they are stuffed
into DN, displayName, name, distinguishedName, commonName - although I
don't
want them there and IMO they have nothing there do.
And if I don't specify the initials in user add, then DN, cn, displayName,
name, distinguishedName are as I want them (but the initials attribute is
missing, of course).
And when I add it then, using 'user rename', those initials are stuffed
into
and change DN, cn, displayName, name, distinguishedName.
This is wrong and no wrapper around 'samba-tool user {add,rename}' it
won't do!
Franta Hanzlik
More information about the samba
mailing list