[Samba] samba-tool user add - weird resulting
Rowland Penny
rpenny at samba.org
Wed Aug 14 10:06:39 UTC 2024
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
More information about the samba
mailing list