Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: sysmark@helios.physics.utoronto.ca (Mark Bartelt)
Subject: SUMMARY: chroot(1) oddity
Date: Tue, 15 Nov 1994 20:02:26 GMT	[thread overview]
Message-ID: <CzBro2.2EB@info.physics.utoronto.ca> (raw)
In-Reply-To: CzBD6C.8xz@info.physics.utoronto.ca

I've had a few replies to my query from earlier today re chroot(1).  None
of them were completely on-target, but one was close (see below).  I had
one suggestion that /etc/svc.conf was needed in the chrooted directory,
but by the time that suggestion arrived, I'd already had a look at that
possibility (a sensible one, since svc.conf has a "passwd=" entry, so who
knows what might happen if svc.conf were missing?), but it turns out that
it isn't needed.  (One can actually infer this without checking, by doing
an "ls -l" (from a non-chrooted environment, of courrse), and then doing a
"ls -lu /etc/svc.conf", and noticing that its atime doesn't change.)

The best suggestion came from Joseph McGuire (joe@alpha.vyne.com), who said

   I beleive that you need to create the (dir and) file
   CHROOTDIR/bin/sia/siainitgood.  [ ... ]

Actually, he meant /etc/sia/siainitgood.  As it turns out, that's not quite
enough (it's necessary but not sufficient).  What you *really* need in the
chrooted environment for "ls" to map numeric uids and gids to user and group
names is the following:

	etc/group
	etc/passwd.dir
	etc/passwd.pag
	etc/sia/bsd_matrix.conf
	etc/sia/matrix.conf
	etc/sia/siainitgood

I had the first three; Joe suggestd the last.  But you also need those .conf
files in the etc/sia directory (matrix.conf is a symlink to bsd_matrix.conf).

By the way, in case anyone thinks that this is a pretty trivial problem to be
worrying about, this isn't actually what prompted the original posting in the
first place.  The *real* problem is that we have an application which we want
to run chroot'ed, and it couldn't run because calls to getpwuid() failed, and
in the course of investigating *that* problem, I discovered that even things
like the "ls" example failed.

Anyway, all is now working happily.  Thanks for the suggestions, everyone!

Mark Bartelt                                                     416/978-5619
Canadian Institute for                                  mark@cita.toronto.edu
Theoretical Astrophysics                                mark@cita.utoronto.ca

"Sheep not busy being shorn are busy frying"  -  Dylan, at a NZ lamb barbecue
             [ singing "It's all right, ma (I'm only bleating)" ]


  reply	other threads:[~1994-11-15 20:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-15 14:49 chroot(1) oddity Mark Bartelt
1994-11-15 20:02 ` Mark Bartelt [this message]
1994-11-22 20:22 ` Joerg Czeranski
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox