[ale] problems with getpwent()
Chris Fowler
ChrisF at computone.com
Mon Mar 5 16:42:26 EST 2001
Help,
I'm trying to create a small based distribution that will run over the network onto a development workstation. My base is rdhat 7.0 and I'm having problems
with the passwd program. I do have an /etc/passwd and everytime I try to runn passwd, I get Can't locate username: No such file or directory. SO I wrote the small piece of code below to test it and I error out with "No such file or directory". If I look in /etc there is a passwd file.
I'm not using shadow nor do I wan to and I'm not use PAM. I have compile login-utils to not use pam nor shadow. Is there anything eles the getpwent()
needs?
Thanks,
Chris
------- pas.c -----------
#include <pwd.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
void
main(void)
{
       struct passwd *pass;
       if ((pass = getpwent()) == NULL)
       {
              perror("pas.c");
              exit(1);
       }
       printf("pass->pw_name: %s\n",pass->pw_name);
}
More information about the Ale
mailing list