Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

While reading about bashrc, I ran into the following fundamental problem of terminal-only machines:

If I run malicious software with a restricted account, it could edit my ".bashrc" file and set an alias to logout. The alias would point to the malicious executable and upon logout it would fake a login screen and obtain passwords to non-restricted accounts and possibly root.

While the quick solution seems to be to set "chattr +i .bashrc" as root, making the file immutable for non-root users, I don't think this is sufficient. Shells are very complex and there might be other ways of defining aliases which I do not know about.

I thought about what the core of the issue is and to me it seems that terminal-only machines allow full control of the UI which is displayed to running software.

So one solution would be to wrap the terminal in a larger piece of UI which displays the current logged in user. This would take away some of the screen though. Another solution would be a special reserved key on the keyboard which forces logout and cannot be re-defined by any aliases and cannot be monitored by any non-root software.

Is there some software which provides this or a similar solution?

share|improve this question

Here is the solution: On Ubuntu 12.04, it is Alt+Print+K for me.

share|improve this answer

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.