[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] problems with getpwent()
- Subject: [ale] problems with getpwent()
- From: ChrisF at computone.com (Chris Fowler)
- Date: Mon, 5 Mar 2001 17:17:01 -0500
<SPAN
class=905540722-05032001>Well,
<SPAN
class=905540722-05032001>??
strace
told me that I di not have lib_nss in my lib directory.?? but, it seems that
ldd did not state that either.?? Is there a way to find out all the
libraries my program uses.?? It works now.
<SPAN
class=905540722-05032001>??
<SPAN
class=905540722-05032001>Chris
<SPAN
class=905540722-05032001>??
<FONT face=Tahoma
size=2>-----Original Message-----From: Chris Fowler
[mailto:ChrisF at computone.com]Sent: Monday, March 05, 2001 4:56
PMTo: Chris Fowler; 'ale at ale.org'Subject: RE: [ale]
problems with getpwent()
I've
seemed to have missed /etc/nsswitch.conf
<SPAN
class=437114721-05032001>??
<SPAN
class=437114721-05032001>getpwent() retuens NULL and errno is set to
Success.?????? anyone have any thoughts?
<SPAN
class=437114721-05032001>??
<SPAN
class=437114721-05032001>Chris
<SPAN
class=437114721-05032001>??
<FONT face=Tahoma
size=2>-----Original Message-----From: Chris Fowler
[mailto:ChrisF at computone.com]Sent: Monday, March 05, 2001 4:42
PMTo: 'ale at ale.org'Subject: [ale] problems with
getpwent()
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) <FONT
size=2>{ ?????????????? <FONT
size=2>struct passwd *pass;
?????????????? if ((pass =
getpwent()) == NULL) ??????????????
{ ??????????????
?????????????? <FONT
size=2>perror("pas.c");
??????????????
?????????????? exit(1);
?????????????? }
?????????????? <FONT
size=2>printf("pass->pw_name: %s\n",pass->pw_name); <FONT
size=2>}