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
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