* [gentoo-amd64] NIS problem
@ 2005-10-25 21:49 Weicheng Pan
2005-10-28 19:44 ` Steve Herber
0 siblings, 1 reply; 2+ messages in thread
From: Weicheng Pan @ 2005-10-25 21:49 UTC (permalink / raw
To: gentoo-amd64
Hi all:
I meet a very strange problem on my NIS. I test two cases, which one is
a Gentoo i386 box, and the other is Gentoo AMD64 box.
I referenced this page:
http://www.linux-nis.org/nis-howto/HOWTO/settingup_client.html , and can
successfully login.
But when my directory has unknown UID on AMD64 box, it will return a
SEGMENTATION FAULT error.
Then I use the following code to verify the client settings:
#include <stdio.h>
#include <pwd.h>
#include <sys/types.h>
int
main(int argc, char *argv[])
{
struct passwd *pwd;
if(argc != 2)
{
fprintf(stderr,"Usage: getwpnam username\n");
exit(1);
}
pwd=getpwnam(argv[1]);
if(pwd != NULL)
{
printf("name.....: [%s]\n",pwd->pw_name);
printf("password.: [%s]\n",pwd->pw_passwd);
printf("user id..: [%d]\n", pwd->pw_uid);
printf("group id.: [%d]\n",pwd->pw_gid);
printf("gecos....: [%s]\n",pwd->pw_gecos);
printf("directory: [%s]\n",pwd->pw_dir);
printf("shell....: [%s]\n",pwd->pw_shell);
}
else
fprintf(stderr,"User \"%s\" not found!\n",argv[1]);
exit(0);
}
Finally, I found that getpwnam() call will cause segmentation fault
rather than return NULL on pass a non-exist username on AMD64 box.
Is anybody has encounter this situation?
Regards,
Weicheng.
--
gentoo-amd64@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-amd64] NIS problem
2005-10-25 21:49 [gentoo-amd64] NIS problem Weicheng Pan
@ 2005-10-28 19:44 ` Steve Herber
0 siblings, 0 replies; 2+ messages in thread
From: Steve Herber @ 2005-10-28 19:44 UTC (permalink / raw
To: gentoo-amd64
I think I have run into this problem in the past but in a different
way. I found some upgrade processes would fail and a strace pointed
to libnss_nis.o. To work around it I would temporally remove the nis
entry from my/etc/nsswitch.conf file.
My problems have cleared up over the past year. I attributed them to
bugs in libnss_nis.
I have not run into your specific problem. I seldom reference UID's
that are not in my NIS system or in the local /etc/password file.
Good luck,
Steve Herber herber@thing.com work: 206-221-7262
Security Engineer, UW Medicine, IT Services home: 425-454-2399
On Wed, 26 Oct 2005, Weicheng Pan wrote:
> Hi all:
> I meet a very strange problem on my NIS. I test two cases, which one is
> a Gentoo i386 box, and the other is Gentoo AMD64 box.
> I referenced this page:
> http://www.linux-nis.org/nis-howto/HOWTO/settingup_client.html , and can
> successfully login.
>
> But when my directory has unknown UID on AMD64 box, it will return a
> SEGMENTATION FAULT error.
>
> Then I use the following code to verify the client settings:
>
> Finally, I found that getpwnam() call will cause segmentation fault
> rather than return NULL on pass a non-exist username on AMD64 box.
>
> Is anybody has encounter this situation?
>
> Regards,
> Weicheng.
>
> --
> gentoo-amd64@gentoo.org mailing list
>
--
gentoo-amd64@gentoo.org mailing list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-28 19:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-25 21:49 [gentoo-amd64] NIS problem Weicheng Pan
2005-10-28 19:44 ` Steve Herber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox