[Samba] Some questions about Samba user accounts.
rpenny at samba.org
Thu May 6 16:52:22 UTC 2021
On 06/05/2021 17:40, Jason Long via samba wrote:
> I used "useradd" and "smbpasswd" for create a Samba user account and I have some questions:
Is this is on a Samba domain member ?
If so, then stop, you are doing it wrong, you need to use samba-tool,
see 'samba user add --help' for more info
> 1- What is a machine account and is it mandatory?
A domain joined computer has an account created for it during the join,
basically a 'machine account' is a 'user account' with an extra objectclass.
> 2- How can I change the password policies like length and complexity criteria when setting up a Samba user password?
> # smbpasswd -a user
> New SMB password:
> Retype new SMB password:
> Failed to modify account record CN=user,CN=Users,DC=mydomain,DC=z to set user attributes: 0000052D: Constraint violation - check_password_restrictions: the password is too short. It should be equal or longer than 7 characters!
> Failed to modify entry for user user.
Still doing it wrong, you don't use smbpasswd, see 'samba-tool -help'
for more info.
> 3- Is it possible to create a group and add users to it?
Yes, 'samba-tool group add' and samba-tool group addmembers', again, add
'--help' to the commands for more info.
> Thank you.
More information about the samba