08 julho, 2007

 

Password authentication

[DRAFT ARTICLE]
This article discuss several aspects about authentication in Linux systems.
[henrique@fuji pam.d]$ pwd
/etc/pam.d
[henrique@fuji pam.d]$ more system-auth
#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required /lib/security/pam_env.so
auth sufficient /lib/security/pam_unix.so likeauth nullok
auth required /lib/security/pam_deny.so

account required /lib/security/pam_unix.so

password required /lib/security/pam_cracklib.so retry=3 type=
password sufficient /lib/security/pam_unix.so nullok use_authtok md5 shadow
password required /lib/security/pam_deny.so

session required /lib/security/pam_limits.so
session required /lib/security/pam_unix.so
Do not think I have changed nor patched this file:
[henrique@fuji pam.d]$ ls -ld --full-time /etc/sgml
drwxr-xr-x 2 root root 4096 Sun Aug 10 05:28:59 2003 /etc/sgml
[henrique@fuji pam.d]$ ls -ld --full-time system-auth
-rw-r--r-- 1 root root 643 Sun Aug 10 05:38:05 2003 system-auth


shadow-:
hclm:$1$786C4qZz$Vx8Tcaj4ew.0tZfGiV7SL/:13554:0:99999:7:::
% id hclm
uid=597(hclm) gid=500(user) groups=500(user)
The pam configuration is according original installation template (here 10 Aug 2003 is the installation date of this system). Anyhow, by default RedHat 7.2 uses a password-MD5 hash for authentication (34 characters), instead of the early-days Linux authentication with crypt (13 characters; the two first are known as salt).
In the example above the hashed weak password corresponds to 'hclm' (same as user name).

This page is powered by Blogger. Isn't yours?