How to create a new sudo user on Ubuntu Linux server

I am a new Ubuntu Linux 16.04.xx LTS server user. How do I create a new sudo user on my server? How do I add a new user as sudoer file using the command line option on Ubuntu?

In Linux (and Unix in general), there is a SuperUser named root. The root user can do anything and everything, and thus doing daily work as the root can be very dangerous. You could type a command incorrectly and destroy the system.

The sudo command allows a permitted user to run a command as the superuser (root user) or another user, as specified by the security policy. Often the sudo used on servers to give admin permissions and privileges to ordinary users. In this quick tutorial, you will learn how to create a sudo user on Ubuntu.

Steps to create a new sudo user on Ubuntu : First add the user, run: sudo adduser – Add the user to sudo group by typing the command in terminal for Ubuntu version 12.04 and above: sudo adduser sudo – In older version of Ubuntu (version 12.04 and older), run: sudo adduser admin – Verify it: id

More about admin and sudo group on Ubuntu server – The members of the admin group may gain root privileges. All members of group sudo run any command on Ubuntu server. Continue reading

Related

JOIN THE DISCUSSION

Comment moderation is enabled. Your comment may take some time to appear.