![]() ![]() ![]() As usual, reach us via the comment form below for any questions or comments. That’s all! In this guide, we looked at how to create a sudo user in the openSUSE Linux distribution. To test if the newly created user account can invoke the sudo command, switch the account using the su command, then run any command using sudo. In this case, the user tecmint can no longer invoke the sudo command unless the user is added to the wheel group. ![]() Note: After the recent changes, the default user account on a freshly installed system is disabled from sudo access. Save the changes in the sudoers’ file and close it. # %wheel ALL=(ALL) ALLĪnd uncomment it to allow members of the group wheel to execute any command by invoking the sudo command: %wheel ALL=(ALL) ALL Configure Wheel GroupĪlso, look for the following line. rootĪLL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!Īnd comment them out as shown in the following screenshot. Look for the lines: Defaults targetpw # ask for the password of the target user i.e. Open the sudoers file for editing by running the following command (by default, visudo uses vim as an editor): $ sudo visudo Now you need to configure the wheel group to allow users who belong to it to execute any command using sudo. Then check the sysadmin’s groups using the groups’ command: $ sudo usermod -aG wheel sysadminĪdd User to Wheel Group Configure Sudo Access and Wheel Group in Sudoers File Execute the command below: useradd -d homedirectory. If you do not want to create the default /home/ username / directory for the user account, set a different one instead of it. In this command, the -a flag means adding the user to the supplementary group specified by the -G flag. A user account has been created with user name robert, sometimes called the login name, and full name Robert Smith. Next, add the user sysadmin to the administrative group called wheel using the usermod command as shown. Therefore we are using it to create another administrative user that can invoke sudo as well. Note that the user tecmint is the default administrative user that can invoke sudo. The -m flag instructs to create the user’s home directory. Start by creating a user account (called sysadmin in this example), using the useradd command, and create a secure password for the user as follows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |