Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have several boxen running Debian Wheezy. They appear to have the highly annoying problem that pressing ctrl+c in a shell that has been su:d to root will kill su, not whatever is running in the root shell. This makes working with e.g. ping or tcpdump near impossible. As I understand it, the issue is debated at length in Debian bug #628843 but there seems to be no consensus.

[20:38] alias
zsu='su root -p -c $SHELL'
[20:38] zsu
zsh compinit: insecure directories and files, run compaudit for list.
Ignore insecure directories and files and continue [y] or abort compinit [n]? y
[20:38] <- I simply pressed ctrl+c
Session terminated, terminating shell...
[20:38]  ...killed.

I need to find a fix for this. Can I execute su differently or is there a replacement I can use instead? (Preferably no sudo and I would prefer not to allow ssh root login.)

share|improve this question
up vote 3 down vote accepted

I ran into the same thing as I had a similar shell alias. I found in the manpage a "-s" option that seemed to resolve this for me:

   -s, --shell SHELL
       The shell that will be invoked.


zsu='su root -p -s $SHELL'
share|improve this answer
Much appreciated! – Bittrance Mar 12 '14 at 22:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.