Subject: Re: bug#8663: chroot problems

From: Bob Proulx <[email-masked]>
Date: Thu, 12 May 2011 12:36:10 -0600

Benedicto Garin wrote:
> I'm trying to run the command below and I get some errors.  I ran
> this command about a month ago with no issue.  Please advise.
> ...
> (May 12 9:03) [/home/bgarin]$/usr/sbin/chroot /chroot/rhel_AS40_x86_64 /bin/bash
> /usr/sbin/chroot /chroot/rhel_AS40_x86_64 /bin/bash
> do_ypcall: clnt_call: RPC: Unable to receive; errno = Connection refused

This is an indication that NIS/YP in your chroot system is not happy.
It is reporting that it is unable to contact the NIS/YP account
server.  You apparently have the chroot set up where account data is
in NIS/YP (formerly known as yellow pages).

Likely the nis/yp server isn't available now.

> The subsequent useview also fails similarly:

Probably the same problem.

I personally would probably start off by going into the chroot as root
expecting that to work and then probing the nis/yp system to see what
problems exist there.  I would expect root to be able to log into it
since the root account is almost always local.

The command ypwhich is often useful to determine which nis/yp server
the local client has bound to.  If it is bound then investigate that
server.  If it isn't bound then that is the problem.

If you are not root then you can still look at the files.  Since the
chroot files are available to you from the outside the next thing I
would do is to look into the chroot area and try to debug the problem
just by inspection.  But if you are not root then you won't be able to
fix anything that you find so that is just for your own curiosity.
For a start look at /etc/nsswitch.conf and observe the settings for
the passwd table.

Since this is unlikely to be a bug related to coreutils I am going to
keep the accounting updated and close the bug.  Please don't take the
fact that the bug is closed to mean that we don't want any more
discussion.  The opposite is true.  If possible please report back to
us on what you find.  Please feel free to keep posting followups.  It
will continue to be tracked in the bug log.  This will help others who
read through it later.  At any time the bug can be opened again if
needed.

Bob