Introduction
In a Kubuntu system, there are usually two types of users: the normal user and the admin user. The normal user has limited access to the system, while the admin user has full administrative privileges. Sometimes, you might want to allow a non-sudo user to perform administrative tasks using sudo. In this article, we will discuss how to allow a non-sudo user to use sudo with an admin user in Kubuntu.
Prerequisites
Before proceeding, ensure the following:
- You have a non-sudo user and an admin user on your Kubuntu system.
- Both users have passwords set up.
Steps to Allow a Non-Sudo User to Use Sudo
To allow a non-sudo user to use sudo, follow these steps:
Step 1: Open the Sudoers File
As the admin user, open the sudoers file using your favorite text editor:
sudo visudo
Step 2: Add the Non-Sudo User to the Sudoers File
Add the following line at the end of the file:
username ALL=(ALL:ALL) ALL
Replace "username" with the actual username of the non-sudo user.
Step 3: Save and Exit the Sudoers File
Save and exit the sudoers file. When prompted, enter the admin user's password.
Testing the Sudo Privileges
To test the sudo privileges for the non-sudo user, log out of the admin user session and log in as the non-sudo user. Try running a command that requires administrative privileges:
sudo apt update
Enter the non-sudo user's password when prompted. If the user has been added to the sudoers file correctly, the command will run successfully.
In this article, we discussed how to allow a non-sudo user to use sudo in Kubuntu. We covered the prerequisites, steps to add the non-sudo user to the sudoers file, and testing the sudo privileges.