Create Sudo User on Ubuntu 22.04 Tutorial Example
For teams turning “Create Sudo User on Ubuntu 22.04 Tutorial Example” into a repeatable delivery task, the documentation on this page can document setup, troubleshooting and review time; managers should interpret those records alongside reliability and completed work, not as a stand-alone score.
Package and operating-system behaviour can change, so verify the commands and supported versions through Ubuntu before running them on a production host.
Hi Guys,
Now, let's see example of Create Sudo User on Ubuntu 22.04 Tutorial Example. step by step explain Create a Sudo User on Ubuntu. we will help you to give example of Configure Sudo User on Ubuntu 22.04. it's simple example of A complete guide on creating a Sudo User on Ubuntu 22.04 LTS. Follow bellow tutorial step of Step-by-step Sudo User on Ubuntu.
You can use this post for ubuntu 14.04, ubuntu 16.04, ubuntu 18.4, ubuntu 20.04, ubuntu 21 and ubuntu 22.04 versions.
Step 1: Log in to the server using ssh
SSH in to your server as the root user:
$ ssh root@your_server_ip_address
Step 2: Create a new user account on Ubuntu
Use the adduser command to add a new user to your system:
# adduser username
Be sure to replace username with the username that you want to create. You will be prompted to create and verify a password for the user:
Step 3: Add the new user to the sudo group
Use the usermod command to add the user to the sudo group:
# usermod -aG sudo username
Step 4: Test sudo user account
To test that the new sudo permissions are working, first use the su command to switch to the new user account:
# su - username
As the new user, verify that you can use sudo by prepending sudo to the command that you want to run with superuser privileges:
$ sudo command_to_run
For example, you can list the contents of the /root directory, which is normally only accessible to the root user:
sudo ls -la /root
- How to Zip a Folder in Ubuntu/Linux Using the Command Line?
- How to Add and Delete Users on Ubuntu?
- How to Change Hostname on Ubuntu 22.04?
- How to Install PHP SOAP Extension on Ubuntu 22.04?
- How to Install and Master Django on Ubuntu 22.04?
- How to Install PHP JSON Extension in Ubuntu 22.04?
- How to install PHP Imagemagick on Ubuntu 22.04?
- How to Install PHP Intl Extension in Ubuntu 22.04 ?