Report this

What is the reason for this report?

Should I Login as Root User?

Posted on August 1, 2014

My question is do I setup a User account and add it to the sudoers list or can I continue to login as root?

To give you some background I still consider myself a novice Linux user. My main function is as a front-end web developer. Throughout my Desktop Linux-life I’ve seen countless articles that state not to login as the root user – ever! Instead setup an account and run sudo commands for the heavy stuff.

With my new-found droplet from Digital Ocean it’s thrown me for a mini loop. I immediately gain root access with no users on the system. So far I’ve performed “YUM install” commands without a care in the world. I’ve moved tarballs into the /usr/src directory then “config-make-makeInstall.” This power is blissful, but my conscious still tugs at me saying I should create a User. Thanks.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Yes, it is a good idea to create a new user, and use sudo for things you need to do as root.

The hundreds of thousands of articles telling you not to use root user are correct.

It is better to set up a user account for normal usage and disable the root account (disable login). Then sudo to do administrative work.

This can prevent mistyped commands do damage to system, though it is rare. If it is a multiple account system, you can assign which user can have sudo right or even prevent some user with sudo right from running certain command like sudo su.

Since sudo will log all the command into /var/log/auth.log (ubuntu), you can review it latter. Enabling log_output in sudoers config, you can use sudoreplay for review.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.