9/16/2023 0 Comments Add sudoers![]() 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 In this command, the -a flag means adding the user to the supplementary group specified by the -G flag. 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 |