Script to check password security
Hi,
Im trying to make a script that will test the suitability of a password. I understand that all the features I want are in the /etc/pam.d/common-password file. From here I can change the length of a password, what characters must be in a password, if the words are in the dictionary, etc... but I don't know how to change these values by using a script. I want it in a script because I want to be able to suggest a more suitable password if the original password doesn't meet the criteria. Cheers Dave |
Quote:
We'll be glad to help you with a script, but I doubt anyone is going to write it for you. Post what you've written, and where you're getting stuck, and we can assist. |
sorry, here's what I have so far.
#!/bin/sh echo "password required pam_cracklib.so \ minlen=6 dcredit=-1 ucredit=-1 password required pam_unix.so use_authok obscure md5 " > /etc/pam.d/common-password This works, it changes the file to the above contents. I think i'm just confusing myself. I need to check this works against a password and if the password doesn't match these criteria I want to suggest an alternative. |
Sorry again,
This wasnt a very good post. I don't think im going about it the right way. I need a script to give an alternative if the password doesn't meet the criteria. This script will just change the file and if I offer an alternative password in here I don't think it will work because this script won't be run everytime a new password is entered. Could anyone point me in the right direction? |
All times are GMT -5. The time now is 08:38 AM. |