Samba4 Domain Password Policy

With Samba4 becoming more relevant everyday as a drop in replacement for AD, I am regularly fielding questions regarding password management. Below I will describe the basics of password management in Samba4 using the samba-tool. The following code shows the commands dealing with passwords and account expiration.

#Disable password expiration for the Administrator account.
samba-tool user setexpiry Administrator --noexpiry

#Show domain level password options.
samba-tool domain passwordsettings show

#Disable password complexity at the domain level.
samba-tool domain passwordsettings set --complexity=off

#Disable password history at the domain level.
samba-tool domain passwordsettings set --history-length=0

#Disable password min-age at the domain level.
samba-tool domain passwordsettings set --min-pwd-age=0

#Disable password max-age at the domain level.
samba-tool domain passwordsettings set --max-pwd-age=0

#Disable minimum password length at the domain level.
samba-tool domain passwordsettings set --min-pwd-length=0
Did you find this article useful? Why not share it with your friends?

1 thought on “Samba4 Domain Password Policy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.