![]() ![]() When prompted, enter a password for the new user and any other information requested.Īfter you finish these steps, the user “bob” will gain sudo capabilities and will be able to run commands with elevated permissions using the sudo command.During the user creation process, this command adds the user “bob” to the sudo group.To add the user “bob” and provide them sudo rights, run the following command:.Log in as root or a user with sudo privileges.To add the user “ bob” directly to the sudoers file, use the adduser command as follows: The -a flag add users to the specified group, and the -G flag specifies the group, which in this case is “sudo.”Īfter running the script, use the groups command to see if the user “bob” was successfully added to the sudo group. To add “bob” to the sudo group, use the following command: sudo usermod -aG sudo bob Using the usermod command, you can add an existing user, such as “bob,” to the sudo group. The user can now log in to the system using their username and password. Once you have completed these steps, the new user account will be created, along with a corresponding group and home directory for that user. ![]() ![]() Įnter the new value, or press ENTER for the default :~$ sudo adduser bobĪdding new user ‘bob' (1001) with group 'bob'. You can enter the required data, such as a password, complete name, phone number, and other optional entries.Įnter to skip any fields you want to leave empty. This command will question you for additional information about the new user. Step3 : To create the new user, execute the following command: sudo adduser bob ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |