herman@kulcs.uucp (Herman Moons) (05/18/89)
I have AIX v2.2.1 running with following corrective services installed: IDENT CORRSVCE 2702 aix IDENT CORRSVCE 1108 nfs IDENT CORRSVCE 1713 tcp/ip IDENT CORRSVCE 1736 aix At our site, we use a combination of /etc/passwd and yellow pages for management of userid's. Password Info: -------------- yellow pages: herman - uid 19 wouter - uid 208 /etc/passwd : root - uid 0 dacnos - uid 31000 Problem: -------- getpwnam() and getpwuid() produce a "memory fault" when executed as root, and when we search first /etc/passwd and then yp passwd catalog. Example program: ---------------- #include <stdio.h> #include <pwd.h> struct passwd *getpwnam(); main(argc, argv) int argc; char *argv[]; { struct passwd *p; int i; for (i=1; argv[i]!=NULL; i++){ p = getpwnam(argv[i]); printf ("name = %s; uid = %d; passwd = %s\n", p -> pw_name, p -> pw_uid, p -> pw_passwd); } /* endfor */ } Example session: ---------------- # bug1 wouter herman root dacnos name = wouter; uid = 208; passwd = kd84./kjKSL name = herman; uid = 19; passwd = 'kKLL89J.lS9 name = root; uid = 0; passwd = BPvxqq)08l/ name = dacnos; uid = 31000; passwd = jkldskKKD0 # bug1 root dacnos wouter herman name = root; uid = 0; passwd = BPvxqq)08l/ name = dacnos; uid = 31000; passwd = jkldskKKD0 Memory fault - core dumped <-- why ??? # My major problem is that these routines are used in several commands, like ls, tar ... and these will fail when used as root. Is this a known problem ? Anyone now of any fixes (apart from reinstalling the original AIX v2.2.1) ? ----------------------------------------------------------------------------- Herman Moons Katholieke Universiteit Leuven Dept. of Computer Science Tf : +32 (16) 20.06.56 Celestijnenlaan 200A Fax: +32 (16) 20.53.08 B-3030 Heverlee-Leuven Belgium e-mail: herman@kulcs.uucp herman@blekul60.bitnet herman@cs.kuleuven.ac.be -----------------------------------------------------------------------------