Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Problem with getpwnam() syscall

Thread Tools

Problem with getpwnam() syscall

Thomas Keller
Posts: n/a
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


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:


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.

Reply With Quote
Joe Smith
Posts: n/a
Thomas Keller wrote:

> Final PERL-related question: How can I retrieve these
> error codes and what do they mean?

perldoc -f getpwnam; man getpwnam; man getpwent

I love my TiVo -
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
why does select syscall returns evenif no data in serial port buffer alok C Programming 2 06-18-2007 11:45 AM
Syscall problem ? yezi C Programming 9 11-01-2005 09:33 PM
Ruby/HPUX/syscall problem/bug Ruby 3 09-07-2004 02:48 PM
[ANN] Tracery - a ruby interface to ptrace syscall on linux Basile Starynkevitch [news] Ruby 0 01-29-2004 08:35 PM
Problem with getpwnam() syscall Thomas Keller Perl Misc 5 01-20-2004 01:22 PM