Re: calling "su" after "chroot"

From: Chris Lowth (please@no.spam)
Date: 03/09/03


From: Chris Lowth <please@no.spam>
Date: Sun, 09 Mar 2003 17:20:07 +0000

panda wrote:

> Dear ALL,
>
> I've called "chroot" to limit the root directory. When i then call
> "su - user1", the system said the user id "user1" is not found. However,
> the user is really in the system. In addition, I've already copied the
> /etc/passwd file to the current user's /etc directory.
>
> Any idea? Thanks.
>
> panda

You need rather more than /etc/passwd. Running "strace" on the su program
shows that (on my system anyway), the following files are used..

        /etc/passwd, /etc/shadow, /etc/group
        /etc/pam.d/*
        /etc/nsswitch.conf /etc/localtime

Plus the shell program (bash), the libraries it uses.

To get the list do (as root) ..

        strace -o /tmp/out -f su -l user1

Then exit the su'd shell and grep for "/" in /tmp/out

Chris

-- 
These ramblings are not sanctioned by my employer,
mother or kids. My views are my own.
My real address is: chris at lowth dot sea oh em
+------------------------------------------------+
| visit: http://protector.sourceforge.net        |
|        for OpenSource (free) virus protection  |
+------------------------------------------------+


Relevant Pages

  • Re: Cross your fingers, cross your toes ...
    ... for not only chris and chris and ... An unholy trinity, Chris the Panda, Chris the Chemist and Chris ... chemistry in high school and never bothered in university). ... You furriners named Chris. ...
    (soc.motss)
  • Re: Cross your fingers, cross your toes ...
    ... for not only chris and chris and ... An unholy trinity, Chris the Panda, Chris the Chemist and Chris the, ... I would think that Chris the Panda and Chris the Chemist are one and the same. ... I am neither a panda nor a chemist (I skipped chemistry in high school and ...
    (soc.motss)
  • Re: Cross your fingers, cross your toes ...
    ... for not only chris and chris and ... but for others who might get confoozd by the ... An unholy trinity, Chris the Panda, Chris the Chemist and Chris ... chemistry in high school and never bothered in university). ...
    (soc.motss)
  • Re: Cross your fingers, cross your toes ...
    ... It definitely needs two words/syllables to work out. ... I would think that Chris the Panda and Chris the Chemist are one and the same. ... I am neither a panda nor a chemist (I skipped chemistry in high school and ...
    (soc.motss)
  • Nickelodeon orders "Kung Fu Panda" series
    ... Nick orders 'Kung Fu Panda' series ... comedy based on last year's boxoffice hit. ... The kids network has ordered 26 episodes of the series, ... "Our seamless collaboration with DreamWorks Animation has now reached ...
    (rec.arts.tv)