Computing Topics --> Security Topics --> All Security Topics Pages --> Dangers and Concerns When Running as Root -->

Dangers and Concerns When Running as Root

When running as root user, or in su mode, there are several issues and concerns which you need to be aware of:

  1. You should never log into your system as root user. When you need to use root access, you should use your regular login, and then use su to enter root-level access. As soon as you are done with your operations, you should immediately type exit to leave root mode. This will prevent you from doing damage to your system.
  2. When you need to run in root mode, to protect yourself, you should add the following line to the file   /root/.bashrc
    alias rm='rm -i'
    This will make your system ask you for confirmation when deleting each file. This way you can avoid accidentally deleting files that you did not want too.
  3. You should never use the commands   rm *  or  rm -rf
    These commands will both delete large quantities of files that can cause widespread damage to your system.
  4. You should under no circumstances ever use IRC chat while running as root. IRC opens up a lot of security holes that can be exploited if you are running as root. Also, many IRC's will not let you access them if you are running as root user.
  5. You should never su to root over a telnet connection. Since telnet does not use any sort of encryption, this will send you root password over the network as plain text and can be obtained by anyone monitoring the network. If you need to have root access remotely, please see our page on Installing Secure Shell.
How do I:
How are we doing? Comments on this page?
Office of Information Technology
Office of Information Technology Help Desk Web Site University of Maryland Web Site Office of Information Technology Web Site