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

Re: chroot and OpenSSH



> > > chroot /path/to/userhomedir /bin/bash
> > >
> > > This fails, and I'm pretty sure that I know why, but I wanted to seek
> > > advice and guidance from those of you who might have experience with
> > > this before proceeding.
> > 
> > Did you add '/bin/usr_login.sh' to /etc/shells?
> 
> Oops hadn't noticed /etc/shells. I added usr_login.sh to it and I'm
> still getting the same error message as before:

This is irrelevant. As far as I know, no login program uses getusershell()
or /etc/shells. (Usually this is an issue with setting up ftpd: "The user
must have a standard shell returned by getusershell(3)...".)

> chroot: cannot change root directory to /home/userdir: Operation not permitted

I see this was answered in other postings.

It might be interesting to have the sshd choose to use chroot depending on
what the user's pw_shell (default shell) is.

Also, don't waste time copying every tool and library; it should work to
simply hard-link the individual files you want (as long as the real
versions are on the same file system).

Good luck,

  Jeremy C. Reed
echo '9,J8HD,fDGG8B@?:536FC5=8@I;C5?@H5B0D@5GBIELD54DL>@8L?:5GDEJ8LDG1' |\
sed ss,s50EBsg | tr 0-M 'p.wBt SgiIlxmLhan:o,erDsduv/cyP'




Reply to: