Re: SSH connection immediately dropped on 'sudo su'
hi
i think i can bet there is a "set -e" anywhere. i did here on my box the following in my user "testuser".
i edit his .bashrc and insert following:
# ~/.bashrc: executed by bash(1) for non-login shells.
set -e
.....
then i run in his home:
root@tschang:/home/surfer# . ./.bashrc (have a look at the user - run befor the modification i ran su - root - was root before !!!)
and now be back in my account:
richi@tschang:~ 18:22-> ( the su session is canceled and i am back in my home).
comment out the "set -e" and it works !
root@tschang:/home/surfer# su - testuser
testuser@tschang:~$
this behavior is although given when i use set -e in the .bashrc and try to open a new terminal - terminal shown up and immediatly gone !
but i ain't have this behavior when i do the same joke in root's .bashrc.
to debug your problem use "set -x" (this set the shell to debug-mode) in the procedures which will run when you are using
the "su - root" ( best in the /root/.bashrc ).
have much fun when you search for this problem
ciao
Last edited by rnerwein; March 2nd, 2013 at 06:42 PM.
"What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht
Bookmarks