ssh jail login problems
07-12-08, 00:16
|
|
|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
ssh jail login problems Since I have upgraded to 3.1 I have a problem logging in now that the jail is setup: Code:
rickyn@zooloo:~/$ ssh account@example.com account@example.com's password: Last login: Sat Jul 12 00:09:07 2008 from myisp.net Mounting all needed directories.... DONE jail: can't canonize path "/bin/sh". Bad path? Connection to example.com closed. |
07-12-08, 04:28
|
|
|---|---|
vibe Registered User Join: Jul 2002 Posts: 245 |
From the docs at http://www.psoft.net/HSdocumentation...here-jail.html Try this: /hsphere/local/config/jail/scripts/check_jail checks whether utilities and their libraries, which are included in the jail enviroment, were changed (for example after system update). If so, the /hsphere/local/config/jail/scripts/config_jail is executed. Maybe this will find problems with the jail environment. __________________ -- Pablo |
07-12-08, 06:34
|
|
|---|---|
vibe Registered User Join: Jul 2002 Posts: 245 |
I think the reason you are getting this error is because the user did not fully logout previously. Check the ps -aux output for any processes running the bash shell for the user you are trying to login as. If they exist, kill them, then try again. This just happened to me and that's how I solved it. Thanks. __________________ -- Pablo |
07-12-08, 10:00
|
||
|---|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
Quote:
Code:
[root@host ~]# /hsphere/local/config/jail/scripts/check_jail + checking md5 sums... + all md5 sums are correct. Reconfiguration is not needed.
|
|
07-12-08, 10:03
|
||
|---|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
Quote:
![]() Code:
[root@host ~]# ps aux | grep wwwuser root 13334 0.0 0.0 3968 628 pts/0 R+ 10:02 0:00 grep wwwuser |
|
07-12-08, 10:05
|
|
|---|---|
vibe Registered User Join: Jul 2002 Posts: 245 |
Try to recreate the jail completely. This is done by executing: /hsphere/local/config/jail/scripts/config_jail Let it run, it will recreate everything in the jail. They you can try again. I hope this helps. __________________ -- Pablo |
07-12-08, 10:35
|
|
|---|---|
vibe Registered User Join: Jul 2002 Posts: 245 |
Hi there, I found another way to try and fix this. Edit the /etc/passwd file by hand of your root install (not in the jail) and change the wwwuser's shell to /bin/bash. Then login as wwwuser via SSH. This will remove all the jail sym links,etc from the wwwuser home directory. Logout. Then edit the /etc/passwd file again and set the shell to /hsphere/shared/bin/jail. Then login as wwwuser. This will recreate the sym links in the wwwuser home directory. See if that 'resets' that user. Cheers. __________________ -- Pablo |
07-13-08, 15:33
|
||
|---|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
Quote:
Code:
[root@host ~]# /hsphere/local/config/jail/scripts/config_jail + cron task added. + creating chroot environment. + created chroot environment in /hsphere/local/jail. + installing basic set of programs... + basic set of programs installed in /hsphere/local/jail. + installing additional set of programs and data ... + additional set of programs installed in /hsphere/local/jail. + formed md5 sums snapshot of jail executables and shared libraries. Code:
rickyn@zooloo:~/$ ssh user@host user@host's password: Last login: Sat Jul 12 00:12:14 2008 from myISP Mounting all needed directories.... DONE jail: can't canonize path "/bin/sh". Bad path? Connection to host closed. |
|
07-13-08, 15:50
|
||
|---|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
Quote:
1) as root edit the /etc/passwd and set shell for wwwuser to /bin/bash 2) login as wwwuser. I get the following message on login: Code:
Last login: Sun Jul 13 15:40:59 2008 from myISP
#############################################################################
# #
# The following file managers are available: #
# #
# mc - GNU Midnight Commander (http://www.ibiblio.org/mc) #
# vifm - ViFM a UNIX Filemanager (http://vifm.sourceforge.net) #
# ytree - Ytree a UNIX Filemanager (http://www.han.de/~werner/ytree.html) #
# #
#############################################################################
4) as root put the shell for wwwuser back to /hsphere/shared/bin/jail 5) login as wwwuser. I get the the same error: Code:
rickyn@zooloo:~/$ ssh wwwuser@host wwwuser@host's password: Last login: Sun Jul 13 15:41:26 2008 from myISP Mounting all needed directories.... DONE jail: can't canonize path "/bin/sh". Bad path? Connection to host closed. __________________ Blizzard Media: www.blizzard-media.com We sell Symfony hosting |
|
07-13-08, 18:57
|
|
|---|---|
blizzard-media. Registered User Join: Jan 2005 Posts: 17 |
Resolved Your hint about the symlink helped me figure this out. I had my own bin directory that was in the way of letting the bin symlink from being created. Once I moved mine to another location, then it was able to create the proper links and now I can login correctly. Thank you for all of your help! __________________ Blizzard Media: www.blizzard-media.com We sell Symfony hosting |
07-14-08, 04:40
|
|
|---|---|
vibe Registered User Join: Jul 2002 Posts: 245 |
Glad you solved it. It is important to point out that you should not have the following directories in a user's home directory: bin dev etc lib usr This will cause trouble. The jailmount script should probably be modified to check for their existance, if so, give an appropriate error. Parallels?! __________________ -- Pablo |
« Previous Thread | Next Thread »
| Search this thread | Forum jump |
|---|---|
| Thread tools | Rating | Display modes |
|---|---|---|
|
Linear Mode
|

