ASK - ANSWER - COMMENT - VOTE - CREATE

MathsGee is Zero-Rated (You do not need data to access) on: Telkom |Dimension Data | Rain | MWEB

0 like 0 dislike
61 views
Why is it bad to run commands as root user?
| 61 views

0 like 0 dislike

Running (everything) as root is bad because:

• Stupidity: nothing prevents you from making a careless mistake. If you try to change the system in any potentially harmful way, you need to use sudo, which ensures a pause (while you're entering the password) to ensure that you aren't about to make a mistake.

• Security: harder to hack if you don't know the admin user's login account. root means you already have one half of the working set of admin credentials.

• You don't really need it: if you need to run several commands as root, and you're annoyed by having to enter your password several times when sudo has expired, all you need to do is sudo -i and you are now root. Want to run some commands using pipes? Then use sudo sh -c "command1 | command2".

• You can always use it in the recovery console: the recovery console allows you to recover from a major mistake, or fix a problem caused by an app (which you still had to run as sudo). Ubuntu doesn't have a password for the root account in this case, but you can search online for changing that - this will make it harder for anyone that has physical access to your box to be able to do harm.

by Diamond (81,178 points)

0 like 0 dislike
0 like 0 dislike
0 like 0 dislike
0 like 0 dislike