Published
danyal.dk
Published
Related Posts
-
Ubuntu 18.04 LTS: What’s New?
Published
-
Generate freeSSL Let’s Encrypt – Per Domain – 1/3
Published
-
Generate free SSL Let’s Encrypt – Wildcard Certificate – 2/3
Published
-
Resolved: forced HTTPS redirect in Homestead running Laravel app
Published
-
Laravel composer install – Your requirements could not be resolved to an installable set of packages.
Published
Create non root user in Ubuntu Server
In order to create a new user, you need root access to the server. Once you are logged in as a root, you are ready to add the new user account. It is discouraged to use root account on regular bases that has ability to make very serious changes. The solution is to create alternative account with reduced scope of influence for daily tasks
Creating a New User
Following example creates new user peter:
# adduser peter
You will be asked few questions, starting with account user password. Enter a strong password, and fill remaining information.
Grant Administrative Privileges
New created account has regular user privileges, in order to perform admin task user peter requires administrative rights, let grant admin rights to the user.
As a root run following command:
# usermod -aG sudo peter
That’s it, now when you login as peter, use sudo for administrative tasks.