1832423 Members
3187 Online
110042 Solutions
New Discussion

erros chroot

 
Fernando Ferri Wollner
Frequent Advisor

erros chroot

I have made the procedure to chroot with a restrict shell, but when i try to login, occurs this error:


subsystem root:/home/bal
login:

when i try to login, it returns incorrect

Any Ideas?

Thanks
4 REPLIES 4
Steven E. Protter
Exalted Contributor

Re: erros chroot

Please show us the user line,cut and paste it out of /etc/passwd

My guess is the restricted shell isn't where you defined it or there is a bad character in the shell field.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Fernando Ferri Wollner
Frequent Advisor

Re: erros chroot

username::110:30::/home/user:*
Frank Slootweg
Honored Contributor

Re: erros chroot

You need a *full* root structure at the new level (/home/bal), which is not a simple thing to set up and there a few to no 'cookbooks'. The only standard documentation is this part of the login(1) manual page:

[Start quote:]
If the command name field is *, a chroot() to the directory named in
the directory field of the entry is performed. At that point login is
re-executed at the new level which must have its own root structure,
including a /usr/bin/login command and an /etc/passwd file.
[End quote.]

From which document did you get the "username::110:30::/home/user:*" part?
Paolo Airaldi
Occasional Advisor

Re: erros chroot

Hi Fernando,

I've also:
mkdir /home/bal/usr/lib/security
cp /etc/pam.conf /home/bal/etc
cp /usr/lib/security/* /home/bal/usr/lib/security

and everything worked.

Good look

Paolo