资源说明:Python-PAM module for salted-hash authentication from a database (MySQL, PostgreSQL, Redis)
Filename: pam_dbauth.py Description: Performs salted-hash authentication from a database Author: Eric WindischCopyright: 2010, Eric Windisch , VPS Village License: EPL v1.0 What does it do? ------------------------------------------------------------------ Supports salted-hash authentication via PostgreSQL, MySQL, and Redis! SQLite3 and other databases may be easily added... Installation & Usage: ------------------------------------------------------------------ Add to PAM configuration with: auth required pam_python.so pam_dbauth.py Requires configuration file, /etc/security/pam_dbauth.conf, Example: [database] host=localhost user=myuser password=mypass db=myuser_db port=XXXX engine=mysqldb ; engine=psycopg2 ; engine=redis [query] ; SQL Example select_statement=select password from users where username=%s ; Redis example: ; select_statement=users:%s:password ; ---------------------------------------------------------------- ; Support forcing or defaulting hashtypes, ; ONLY effective if stored password does not start with {hashtype}. ; ---------------------------------------------------------------- ; hashtype_force=sha1 ; ; ---------------------------------------------------------------- ; Default type to be used if all auto-detection fails (unlikely) ; ---------------------------------------------------------------- ; hashtype_default=md5
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。