Re: user dchroot does not work
I fixed the problem. $SHELL was set to "bash" and not to "/bin/bash". Regards, Alexander -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Thomas Steffen wrote: > Just a guess, but it may be that dchroot does not create a terminal by > default. So try dchroot -c ia32 sh first, and then start glxgears from > the shell. You can also check the variable $DISPLAY that way. $ dchroot -c ia32 sh (ia32) sh Must be connected to a terminal. dchroot: Child exited non-zero. dchroot: Operation failed. There is no program that starts with dchroot as user. As root all programs run with dchroot. As user I have the possibility to dchroot with preserving environment or without but both produce an error: $ dchroot -c ia32 ls (ia32) ls Must be connected to a terminal. dchroot: Child exited non-zero. dchroot: Operation failed. [EMAIL PROTECTED]:~$ dchroot -c ia32 -d ls (ia32) ls No shell dchroot: Child exited non-zero. dchroot: Operation failed. But as I have said before I can chroot as root, then switch user in the chroot environment and then all programs run too. So what's the problem with dchroot? Regards, Alex -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Thomas Steffen wrote: > Just a guess, but it may be that dchroot does not create a terminal by > default. So try dchroot -c ia32 sh first, and then start glxgears from > the shell. You can also check the variable $DISPLAY that way. $ dchroot -c ia32 sh (ia32) sh Must be connected to a terminal. dchroot: Child exited non-zero. dchroot: Operation failed. There is no program that starts with dchroot as user. As root all programs run with dchroot. As user I have the possibility to dchroot with preserving environment or without but both produce an error: $ dchroot -c ia32 ls (ia32) ls Must be connected to a terminal. dchroot: Child exited non-zero. dchroot: Operation failed. [EMAIL PROTECTED]:~$ dchroot -c ia32 -d ls (ia32) ls No shell dchroot: Child exited non-zero. dchroot: Operation failed. But as I have said before I can chroot as root, then switch user in the chroot environment and then all programs run too. So what's the problem with dchroot? Regards, Alex -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
On 5/25/05, Alexander Fieroch <[EMAIL PROTECTED]> wrote: > > Then I get the following error: > > $ dchroot -c ia32 glxgears > (ia32) glxgears > Must be connected to a terminal. > dchroot: Child exited non-zero. > dchroot: Operation failed. > > Any hints? Just a guess, but it may be that dchroot does not create a terminal by default. So try dchroot -c ia32 sh first, and then start glxgears from the shell. You can also check the variable $DISPLAY that way. Thomas
Re: user dchroot does not work
Alexander Fieroch wrote: > Bob Proulx wrote: > > Have all of your 'dchroot' calls used -d? Does it work without -d? > > Then I get the following error: > > $ dchroot -c ia32 glxgears > (ia32) glxgears > Must be connected to a terminal. > dchroot: Child exited non-zero. > dchroot: Operation failed. > > Any hints? Well, glxgears is a graphical application and needs $DISPLAY. I would not expect that to work without -d. So I guess I should have been more specific. I was thinking more along the lines of simple commands. Something that would test if my wild guess of something to do with LD_LIBRARY_PATH or other was the problem. Something like this. dchroot -c ia32 hostname dchroot -c ia32 pwd dchroot -c ia32 ls That type of thing. Bob -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Bob Proulx wrote: > Have all of your 'dchroot' calls used -d? Does it work without -d? Then I get the following error: $ dchroot -c ia32 glxgears (ia32) glxgears Must be connected to a terminal. dchroot: Child exited non-zero. dchroot: Operation failed. Any hints? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Alexander Fieroch wrote: > I also can chroot to my chroot-path as root and switch to the user. Then > I can start every programm. > The thing that's not working is dchroot as user. As root it's working too. Have all of your 'dchroot' calls used -d? Does it work without -d? The above makes me think you have LD_LIBRARY_PATH or some such variable set which is breaking bash in the chroot. The -d is preserving the environment. By going in as root and then switching to the user you are probably avoiding passing along those environment variables. So I would try it without the -d and then I would check the environment. Bob signature.asc Description: Digital signature
Re: user dchroot does not work
Sven Mueller wrote: > Please show us > > grep [username] /etc/passwd /etc/group $ grep alex /etc/passwd /etc/group /etc/passwd:alex:x:1000:1000:Alexander Fieroch,,,:/home/alex:/bin/bash /etc/group:dialout:x:20:alex /etc/group:cdrom:x:24:alex,hal /etc/group:floppy:x:25:alex,hal /etc/group:audio:x:29:alex /etc/group:video:x:44:alex /etc/group:plugdev:x:46:alex /etc/group:staff:x:50:alex /etc/group:alex:x:1000: > grep [username] [chroot-base]/etc/passwd [chroot-base]/etc/group $ grep alex /var/chroot/linux32/etc/passwd /var/chroot/linux32/etc/group /var/chroot/linux32/etc/passwd:alex:x:1000:1000:Alexander Fieroch,,,:/home/alex:/bin/bash /var/chroot/linux32/etc/group:adm:x:4:alex /var/chroot/linux32/etc/group:dialout:x:20:alex /var/chroot/linux32/etc/group:cdrom:x:24:alex /var/chroot/linux32/etc/group:floppy:x:25:alex /var/chroot/linux32/etc/group:audio:x:29:alex /var/chroot/linux32/etc/group:www-data:x:33:alex /var/chroot/linux32/etc/group:video:x:44:alex /var/chroot/linux32/etc/group:alex:x:1000: > You have been asked to provide this information before, but declined > doing so. It's really difficult to help you if you don't supply all the > info you have been asked for. I'm sorry for that. I've checked it for myself and thought it was ok. What do you think? Thanks & regards, Alex > cu, > sven -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Alexander Fieroch wrote on 12/05/2005 14:50: > > Javier Kohen wrote: > >>I'm not sure this could cause that message, but does the user's home >>directory exist in the chroot? > > Yes the user's home directory does exist. It's a complete debian ia32 > installation on a separate partition. > The user's home directory of debian 64 does not really exist. It's a > mount bind to the one from debian ia32. But it's working with debian 64 > and it's available in ia32 chroot. Please show us grep [username] /etc/passwd /etc/group grep [username] [chroot-base]/etc/passwd [chroot-base]/etc/group Replace [username] with the username in question and [chroot-base] with the root directory of your chroot-Environment You have been asked to provide this information before, but declined doing so. It's really difficult to help you if you don't supply all the info you have been asked for. cu, sven -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Javier Kohen wrote: > I'm not sure this could cause that message, but does the user's home > directory exist in the chroot? Yes the user's home directory does exist. It's a complete debian ia32 installation on a separate partition. The user's home directory of debian 64 does not really exist. It's a mount bind to the one from debian ia32. But it's working with debian 64 and it's available in ia32 chroot. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
El miÃ, 11-05-2005 a las 22:31 +0200, Alexander Fieroch escribiÃ: > Javier Kohen wrote: > Yes, it's /bin/bash and it is readable and executable: > -rwxr-xr-x 1 root root 611K Dec 19 17:53 /bin/bash > > I also can chroot to my chroot-path as root and switch to the user. Then > I can start every programm. > The thing that's not working is dchroot as user. As root it's working too. > > Any hints? I'm not sure this could cause that message, but does the user's home directory exist in the chroot? Greetings, -- Javier Kohen <[EMAIL PROTECTED]> ICQ: blashyrkh #2361802 Jabber: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: user dchroot does not work
Javier Kohen wrote: > Is bash the user's shell? > > The following should give you the shell that's currently set for that > user. Make sure it exists inside the chroot. > grep YOUR_USER_NAME PATH_TO_CHROOT/etc/passwd | cut -d : -f 7 Yes, it's /bin/bash and it is readable and executable: -rwxr-xr-x 1 root root 611K Dec 19 17:53 /bin/bash I also can chroot to my chroot-path as root and switch to the user. Then I can start every programm. The thing that's not working is dchroot as user. As root it's working too. Any hints? Regards, Alexander -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
El miÃ, 11-05-2005 a las 21:16 +0200, Alexander Fieroch escribiÃ: > Javier Kohen wrote: > > Is the dchroot binary suid? It should be if you intend to run it as a > > regular user. > > > > [EMAIL PROTECTED]:~$ ls -l /usr/bin/dchroot > > -rwsr-xr-x 1 root root 11432 2005-04-10 19:38 /usr/bin/dchroot > > Ok, I set the suid bit to dchroot, but now I'm back to the last message: > > $ dchroot -c ia32 -d glxgears > (ia32) glxgears > No shell > dchroot: Child exited non-zero. > dchroot: Operation failed. > > The user still exists and bash is executable. > What's wrong? Is bash the user's shell? The following should give you the shell that's currently set for that user. Make sure it exists inside the chroot. grep YOUR_USER_NAME PATH_TO_CHROOT/etc/passwd | cut -d : -f 7 Greetings, -- Javier Kohen <[EMAIL PROTECTED]> ICQ: blashyrkh #2361802 Jabber: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: user dchroot does not work
Javier Kohen wrote: > Is the dchroot binary suid? It should be if you intend to run it as a > regular user. > > [EMAIL PROTECTED]:~$ ls -l /usr/bin/dchroot > -rwsr-xr-x 1 root root 11432 2005-04-10 19:38 /usr/bin/dchroot Ok, I set the suid bit to dchroot, but now I'm back to the last message: $ dchroot -c ia32 -d glxgears (ia32) glxgears No shell dchroot: Child exited non-zero. dchroot: Operation failed. The user still exists and bash is executable. What's wrong? Thanks & regards, Alex -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
El miÃ, 11-05-2005 a las 20:11 +0200, Alexander Fieroch escribiÃ: > $ dchroot -c ia32 -d glxgears > (ia32) glxgears > dchroot: chroot: Operation not permitted > dchroot: Child exited non-zero. > dchroot: Operation failed. > What have I done wrong? Is the dchroot binary suid? It should be if you intend to run it as a regular user. [EMAIL PROTECTED]:~$ ls -l /usr/bin/dchroot -rwsr-xr-x 1 root root 11432 2005-04-10 19:38 /usr/bin/dchroot -- Javier Kohen <[EMAIL PROTECTED]> ICQ: blashyrkh #2361802 Jabber: [EMAIL PROTECTED] signature.asc Description: This is a digitally signed message part
Re: user dchroot does not work
Bob Proulx wrote: > sudo dchroot -c ia32 > > At that point you should be root in your chroot. Use su to load the > user environment. Where 'youruser' is your normal user account. > > su - youruser > > What does that say? I am guessing it will say no shell. Look to see > why. These commands should help. Hm no, now it does not say "no shell" anymore but: $ dchroot -c ia32 -d glxgears (ia32) glxgears dchroot: chroot: Operation not permitted dchroot: Child exited non-zero. dchroot: Operation failed. I don't know what I've done but now the problem is that I have no permissions. The same user, passwd and group exists. What have I done wrong? Thanks & regards, Alexander -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: user dchroot does not work
Alexander Fieroch wrote: > $ dchroot -c ia32 -d openoffice > (ia32) openoffice > No shell > dchroot: Child exited non-zero. > dchroot: Operation failed. > > In google I've found the same problem with this answer: > > "Literally that looks like you have no shell. Check your password > field entry in your chroot and verify that shell exists in the chroot > and is executable there along with all required libraries for it." I think I actually wrote that previously so I might as well jump in again. :-) > I have the same users and passwords in debian amd64 and chroot ia32. > /home is the same directory using a mount bind. The shell (/bin/bash) > exists and is readable and executable for everyone. Use dchroot as root to become root in the chroot. Then from there can you su to the user? sudo dchroot -c ia32 At that point you should be root in your chroot. Use su to load the user environment. Where 'youruser' is your normal user account. su - youruser What does that say? I am guessing it will say no shell. Look to see why. These commands should help. id youruser getent passwd youruser grep youruser /etc/passwd grep youruser /etc/group Somewhere along the way the problem will be obvious. Bob signature.asc Description: Digital signature