Jailshell users unable to execute commands

spcook

Registered
May 11, 2006
3
0
151
After migrating a server to different hardware we are currently running into this issue. When a user is given SSH access through a jailshell when logging in it gives these errors:

Last login: Thu Sep 10 15:58:45 2009 from ***.**.***.***
/bin/grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/usr/bin/id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
-jailshell: [: =: unary operator expected
/bin/grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/usr/bin/id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
-jailshell: [: =: unary operator expected
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
-jailshell: [: =: unary operator expected
/usr/bin/whoami: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
whoami: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
grep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
mesg: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
dircolors: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
[email protected] [~]#

Also when trying to execute commands it gives more shared libraries errors:
[email protected] [~]# ps
ps: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
[email protected] [~]# ls
/bin/ls: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory

I am guessing that is has to do with the permissions of the files within the virtfs structure for the account. When the user is in a normal shell (as well as root) all the commands work with no problems.

Just looking at the libc.so.6 issue here are the permissions within the virtfs lib directory:

[/home/virtfs/username/lib]
-rwxr-xr-x 1 root root 1603396 Aug 14 10:44 libc-2.5.so*
lrwxrwxrwx 1 root root 11 Sep 10 15:03 libc.so.6 -> libc-2.5.so*

Am I on the right track here, or completely off track? Any ideas on how to solve this issue?
 

spcook

Registered
May 11, 2006
3
0
151
So for that specific user I unmounted all of their virtfs directories and then removed their specific /home/virtfs/username directory. Upon relogging with that user it gave no errors and commands are executing as they should.

I am guessing that during the migration when the virtfs system was copied it messed up permissions or something else that caused users logging back into the virtfs system to get these errors.