Steps to disable a password expiration in Samba 4.
To check what is the password expiration time:
samba-tool domain passwordsettings show
params.c:pm_process() - Processing configuration file "/etc/samba/shares.conf"
Password informations for domain 'DC=ff,DC=lan'
Password complexity: off
Store plaintext passwords: off
Password history length: 24
Minimum password length: 0
Minimum password age (days): 0
Maximum password age (days): 365
Disable password expiration:
samba-tool domain passwordsettings set --max-pwd-age=0
params.c:pm_process() - Processing configuration file "/etc/samba/shares.conf"
Maximum password age changed!
All changes applied successfully!
Check if the changes were accepted:
samba-tool domain passwordsettings show
params.c:pm_process() - Processing configuration file "/etc/samba/shares.conf"
Password informations for domain 'DC=ff,DC=lan'
Password complexity: off
Store plaintext passwords: off
Password history length: 24
Minimum password length: 0
Minimum password age (days): 0
Maximum password age (days): 0