[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chroot()ing a user's login



Hi Robert,

> > > > And this works:
> > > > expanse:~# chroot /usr/remote/ su - ookhoi
> > > > ookhoi $
> > > > 
> > > > Of course bash is there:
> > > > ookhoi $ /bin/bash 
> > > > ookhoi $ 
> > > 
> > > And is it in the chrooted /etc/shells?
> > 
> > Thanx you for your response! Yes, it is:
> > 
> > okhoi $ cat /usr/remote/etc/shells
> > # /etc/shells: valid login shells
> > /bin/ash
> > /bin/bash
> > /bin/csh
> > /bin/sh
> > /usr/bin/es
> > /usr/bin/ksh
> > /usr/bin/rc
> > /usr/bin/tcsh
> > /usr/bin/zsh
> > /bin/sash
> > 
> > But if not, then a normal login wouldn't work either I think?
> 
> I will try to reproduce it at home.... It seems to be quite useful for ISP
> setups... In the meantime, did you try giving 
>    
>   chroot /usr/remote /bin/bash
> 
> as your login shell? Of course enter it into /etc/shells as well. I did
> not try it yet, but it could even work.

You mean in /usr/remote/etc/passwd ?  That wil not work, because it then
can't chroot to /usr/remote  In /etc/passwd it is not nescessary because
the chroot works already. If I do a login in stead of a su, I see the
motd from /etc/motd at the first login, and the /usr/remote/motd at the
second login (you have to type in your password twice for a chroot
login).

		Ookhoi


Reply to: