I have a problem with the password policy.
I set the passwords to be strong and every 90 days they expire.
I noticed that when passwords expire I can create a ‘weak’ password.
For example
My current password is W3ll1ngt0n@21
The password expired and I changed it to Wellington21. The system accepted. This is not a strong password.
Is there any way the system can accept passwords with special characters?
I could reproduce the issue, it seems samba does not force special chars even if complexity is enabled
It seems to force a capital letter and digits but I couldn’t find documentation about samba password complexity.
There’s a possibility to use a password script to check the password, see smb.conf manpage
Yes, this option. Hm, here it works. If you want to use it we could try to solve it but I think you should go for the script. If I find time I’m going to play with it…
The password contains characters from three of the following categories:
Uppercase letters of European languages (A through Z, with diacritic marks, Greek and Cyrillic characters)
Lowercase letters of European languages (a through z, sharp-s, with diacritic marks, Greek and Cyrillic characters)
Base 10 digits (0 through 9)
Non-alphanumeric characters (special characters): (~!@#$%^&*_-+=`|(){}:;"'<>,.?/) Currency symbols such as the Euro or British Pound aren’t counted as special characters for this policy setting.
Any Unicode character that’s categorized as an alphabetic character but isn’t uppercase or lowercase. This group includes Unicode characters from Asian languages.
I got a working script. I just adapted the example script to work. I’m not a perl expert so please check the script and ping me if there’s something to improve.
Put the script checkpassword.pl to /var/lib/machines/nsdc/usr/local/sbin/ and set execute permission: