Problem with getpwnam() syscall

T

Thomas Keller

Hello there!

I have a small problem while setting up a chrooted cvs
server which returns "No such system user" when I try
to do some action on it (e.g. "cvs co module").
I tracked the problem down to the getpwnam syscall
somewhere inside the CVS code and tried to chroot
into my server's environment myself to see whats up.

Since I'm (not yet) very comfortable with Perl I wrote
a very small script which does nothing else than

#!/usr/bin/perl

print getpwnam("tommyd"),"\n";

Outside the chrooted environment it returns the
proper information. Inside the chroot it does not.

I have a small directory tree for the cvs environment
created by following the instructions in [0],
a /etc/passwd file exists in there, here it is:

cvs::6000:6000::/:/sbin/nologin
tommyd:0m6PRAVWkfIZg:6000:6000::/:/sbin/nologin

The pl-script returns NULL when calling getpwnam, which
means, according to perldoc, that the user does not
exists. I read somewhere that this is only particularily
right since there could popup other error codes.

Final PERL-related question: How can I retrieve these
error codes and what do they mean? Has anybody experienced
similar problems like me with the getpwnam function?

Thanks in advance for any answers!

Thomas "TommyD" Keller.

[0] http://www.unixtools.org/cvs/server-how-to.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top