PDA

View Full Version : Password Strength Checker



teardrop
August 3rd, 2005, 05:25 AM
I'm writing a bash shell script to manage ftp virtual users and i want to use the built-in password strength checking utility, but i'm having difficulty finding what that is precisely. I would like to enforce that there be at the least lowercase, numbers, and special characters and that it be a minumum of 8 characters long. While I could write the password checking into the script, why recreate the wheel? I'm under ubuntu btw. Thanks for any help you can provide. And help with using it would be appreciated.

ubuntu_demon
August 3rd, 2005, 01:10 PM
maybe check out libpam-passwdqc or its source

teardrop
August 3rd, 2005, 06:54 PM
maybe check out libpam-passwdqc or its source

I can't figure out how to use this in the script, any help would be appreciated. This seems to be a little beyond me, I don't know how to load or access these libraries.

ubuntu_demon
August 4th, 2005, 10:23 AM
I can't figure out how to use this in the script, any help would be appreciated. This seems to be a little beyond me, I don't know how to load or access these libraries.
I've never made a password strength checker or directly accessed libraries either :)

I'll look into it a bit this weekend. Let's see what I can dig up. Maybe I'll create a password strengh checker and learn python at the same time next week.

LordHunter317
August 4th, 2005, 02:49 PM
You wouldn't.

You'd add the pam module to the pam stack, and then call ueradd/delete and passwd normally. PAM handles the rest for you.

ubuntu_demon
August 4th, 2005, 06:13 PM
You wouldn't.

You'd add the pam module to the pam stack, and then call ueradd/delete and passwd normally. PAM handles the rest for you.
please elaborate a bit

LordHunter317
August 4th, 2005, 07:10 PM
PAM is the authentication stack used by all supporting application (which is most of them, on Linux).

You change the contents of the stack and all applications using PAM are effected. For example, if you start using LDAP, you change the approrpiate pam files, and all applications start using LDAP: no recompiles or updates necessary.

teardrop
August 4th, 2005, 07:17 PM
Like I said, I want to use it from within a script to check the passwords of virtual users. "You wouldn't." Wouldn't I? What PAM module are you referring to? Is there one for adding and deleting virtual FTP users from a text file? Do I need to write my own PAM module now? Or is there a simple program for password strength checking out there? Please elaborate.

(I stress VIRTUAL, meaning they are not found in the passwd file, they are just names in a text file that are loaded in a berkeley db for use by PAM when authenticating in vsftpd. I'm trying to manage them using this program and manipulating the contents of a textfile containing users/passwords before they are loaded into the db)