Submitted by yngens on Mon, 06/23/2014 - 22:48
Currently users can enter literally anything in the password field, which is not always ok for the end applications. Would be nice for Virtualmin to prevent users from entering special characters like ' or " in the password field or automatically sanitize such entries.
Thanks for considerations.
Status:
Closed (fixed)
Comments
Submitted by andreychek on Mon, 06/23/2014 - 22:53 Comment #1
Howdy -- you can add restrictions to what can be used as a password by going into Webmin -> System -> Users and Groups -> Module Config -> Password Restrictions.
There are a number of options you can tweak on that screen, but it sounds like you may want to set "Perl regexp to check password against" to look for certain characters.
Submitted by yngens on Mon, 06/23/2014 - 23:08 Comment #2
Excellent advice! Thank you very much!
Submitted by yngens on Tue, 06/24/2014 - 00:05 Comment #3
It works great, but throughs out a not very user-friendly message to the screen:
Failed to modify domain : Password does not match regexp ^[a-zA-Z0-9]+$
I wonder is there an easy way to replace this message to something like:
Only letters and numbers are allowed when choosing your password.
Submitted by andreychek on Tue, 06/24/2014 - 22:15 Comment #4
Sure, you can customize that by creating this file:
/etc/webmin/useradmin/custom-lang
And in there, add this line:
usave_epasswd_re=Only letters and numbers are allowed when choosing your password.
Once you do that, restart Webmin, and then it should use that customized text.
Submitted by yngens on Wed, 06/25/2014 - 00:21 Comment #5
Nice, thanks!