![]() ![]() Does not allow scripting/ automation or multitasking.GUI uses additional system resources, thus makes the system slower.Does not provide the same level of functionality as the CLI.Visual representation can seem easier and faster to beginner-level users.Does not need any separate task for setting the password and adding the new user to the sudo group.Does not require any knowledge of commands.CLI tools are not readily available on all Linux distributions or on all versions (i.e.Alpine Linux, Arch Linux).Has to perform a separate task for adding a user to the sudo group.A faster process because CLI does not use additional system resources. ![]() Can be used for scripting and Automation.Utilizes functionality of the command line.In the above image, you can see that the account has administrative privileges. The user is automatically added to sudo as I created the account of Administrator type. As a result of completing the aforementioned steps, you can see that I have successfully created a new user in Ubuntu. ❻ Additionally, Select the account type Administrator to give sudo permissions to the new user. ❺ Now, Click the Add User button at the top right corner. ➌ In addition, to perform actions as administrator press the Unlock button ❹ Further, Authenticate your user account by entering the password for the currently logged-in user. ➋ Go to the “ Users” settings as shown in the image below. ➊ At first, click the Applications menu and then select “ Settings” from the available applications. Following the steps below you can do the same. In this example, I will add a new user named “ new_user2” using the GUI. You do not need any command to create a new user and give it sudo privileges from the GUI. Method 02: Using GUI to Create a User Account in Ubuntu and Add It to Sudo GroupĪpart from using the terminal, you can create a user from the graphical user interface ( GUI) as well. ➋ Type the following command in the command line and press ENTER to execute: sudo adduser new_user1įurthermore, you can follow this guide to verify whether the newly created user has sudo access. ![]() You can follow the instructions given below to do the same. In this example, I will create a new user named “ new_user1” using the adduser command and then add it to the sudo group. Adding a new user to the sudo requires running the usermod command as a root user in your terminal. If you want to give this user sudo privileges, you will need to add it to the system’s sudo group. But It will not be as interactive as the adduser command.Īfter creating a new user, by default, it will be added to the group under the username itself. However, you can use the useradd command to create a new useras well. This command by default adds the newly created user to a corresponding group, home directory and then prompts to set the new user password. One of the convenient ways to create a new user in Ubuntu is by using the adduser command. Method 01: Using CLI to Create a User Account in Ubuntu and Add It to Sudo Group And remember, "With great power comes great responsibility.Moreover, you can read our Comparative Analysis of Methods to distinguish between the two methods and best pick one for your needs. ![]() That's all you need to know about creating a new sudo user in Linux. Debian based systems (Ubuntu / Linux Mint / ElementryOS) sudo deluser username RHEL based systems (Fedora / CentOS) sudo userdel username To delete a user, use the following commands. On Debian systems (Ubuntu / Linux Mint / ElementryOS), add users to the sudo group sudo usermod -aG sudo username On RHEL based systems (Fedora / CentOS), add users to the wheel group sudo usermod -aG wheel username How to Delete a User Use passwd to update the new user's password sudo passwd usernameĪ strong password is highly recommended! Give the New User Sudo PermissionsĪfter creating a new user, add them to the appropriate group using the usermod command. Also, note that to create a new user, you must also be a sudo user yourself. How to Create a New User Use adduser or useradd to add a new user sudo adduser usernameīe sure to replace username with the user that you want to create. Be careful who you grant sudo permissions to – you are quite literally handing them the key your house.īefore creating a new sudo user, you must first create a new user. Sudo stands for either "superuser do" or "switch user do", and sudo users can execute commands with root/administrative permissions, even malicious ones. ![]()
0 Comments
Leave a Reply. |