supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* chpst -u -/ "unable to get password/group file entry"
@ 2008-08-04 16:54 David Miller
  2008-08-05 14:56 ` Jack Cummings
  0 siblings, 1 reply; 8+ messages in thread
From: David Miller @ 2008-08-04 16:54 UTC (permalink / raw)
  To: supervision

When I try to combine -u and -/ I get the error:
chpst: fatal: unable to get password/group file entry: file does not exist

At first I thought that it might need the passwd and group file inside the chroot but even when I copy them over chpst still fails.  I would imagine that chpst can read the passwd/group file before switching into the jail. 

Specifying the uid and gid with -u :uid:gid does work as expected. Also using -u 'username' without -/ works fine.

Heres a transcript to show what I mean, am I doing something wrong? I would like to use -u username so I don't have to lookup the uid.

Thanks!

root@desktop:/home/dave# ls -RF chroot/
chroot/:
lib/  ls*

chroot/lib:
ld-linux.so.2*  libattr.so.1*  libpthread.so.0*
libacl.so.1*    libc.so.6*     librt.so.1*

root@desktop:/home/dave# chpst -u dave -/ chroot/ /ls
chpst: fatal: unable to get password/group file entry: file does not exist

root@desktop:/home/dave# grep dave /etc/passwd
dave:x:1000:100:David Miller,,,:/home/dave:/bin/bash

root@desktop:/home/dave# mkdir chroot/etc
root@desktop:/home/dave# cp /etc/passwd /etc/group chroot/etc
root@desktop:/home/dave# chpst -u dave -/ chroot/ /ls
chpst: fatal: unable to get password/group file entry: file does not exist

root@desktop:/home/dave# rm -r chroot/etc/
root@desktop:/home/dave# chpst -u :1000:100 -/ chroot/ /ls
lib  ls



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-08-07 21:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-04 16:54 chpst -u -/ "unable to get password/group file entry" David Miller
2008-08-05 14:56 ` Jack Cummings
2008-08-07  2:39   ` David Miller
2008-08-07  6:23     ` Mike Buland
2008-08-07 20:32       ` David Miller
2008-08-07 20:40         ` Mike Buland
     [not found]         ` <m3abfo7din.fsf@multivac.cwru.edu>
2008-08-07 21:25           ` David Miller
2008-08-07 21:30             ` Mike Buland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).