Revisions
- January 4, 2018 @ 16:41:54 [Current Revision] by Sharing Solution
- January 4, 2018 @ 16:41:54 by Sharing Solution
- January 4, 2018 @ 16:40:48 by Sharing Solution
- January 4, 2018 @ 16:40:10 by Sharing Solution
- January 4, 2018 @ 16:39:11 [Autosave] by Sharing Solution
- January 4, 2018 @ 16:36:03 by Sharing Solution
Revision Differences
January 4, 2018 @ 16:40:48 | Current Revision | ||
---|---|---|---|
Content | |||
Unchanged: The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on CentOS, without having to modify your server's sudoers file. If you want to configure sudo for an existing user, simply skip to step 3. | Unchanged: The sudo command provides a mechanism for granting administrator privileges, ordinarily only available to the root user, to normal users. This guide will show you the easiest way to create a new user with sudo access on CentOS, without having to modify your server's sudoers file. If you want to configure sudo for an existing user, simply skip to step 3. | ||
Unchanged: Steps to Create a New Sudo User | Unchanged: Steps to Create a New Sudo User | ||
Unchanged: Log in to your server as the root user. | Unchanged: Log in to your server as the root user. | ||
Deleted: ssh root@server_ip_address | Added: <strong>ssh root@server_ip_ address</strong> | ||
Unchanged: Use the adduser command to add a new user to your system. | Unchanged: Use the adduser command to add a new user to your system. | ||
Unchanged: Be sure to replace username with the user that you want to create. | Unchanged: Be sure to replace username with the user that you want to create. | ||
Deleted: adduser username | Added: adduser<strong> username | ||
Added: </strong> | |||
Unchanged: Use the passwd command to update the new user's password. | Unchanged: Use the passwd command to update the new user's password. | ||
Deleted: passwd username | Added: passwd<strong> username</strong> | ||
Unchanged: Set and confirm the new user's password at the prompt. A strong password is highly recommended! | Unchanged: Set and confirm the new user's password at the prompt. A strong password is highly recommended! | ||
Deleted: Set password prompts: | |||
Deleted: Changing password for user username. | |||
Deleted: New password: | |||
Deleted: Retype new password: | |||
Deleted: passwd: all authentication tokens updated successfully. | |||
Unchanged: Use the usermod command to add the user to the wheel group. | Unchanged: Use the usermod command to add the user to the wheel group. | ||
Deleted: usermod -aG wheel username | Added: usermod<strong> -aG wheel username</strong> | ||
Unchanged: By default, on CentOS, members of the wheel group have sudo privileges. | Unchanged: By default, on CentOS, members of the wheel group have sudo privileges. | ||
Unchanged: Test sudo access on new user account | Unchanged: Test sudo access on new user account | ||
Unchanged: Use the su command to switch to the new user account. | Unchanged: Use the su command to switch to the new user account. | ||
Deleted: su - username | Added: su<strong> - username</strong> | ||
Unchanged: As the new user, verify that you can use sudo by prepending "sudo" to the command that you want to run with superuser privileges. | Unchanged: As the new user, verify that you can use sudo by prepending "sudo" to the command that you want to run with superuser privileges. | ||
Deleted: sudo command_to_run | Added: sudo<strong> command_to_run</strong> | ||
Unchanged: For example, you can list the contents of the /root directory, which is normally only accessible to the root user. | Unchanged: For example, you can list the contents of the /root directory, which is normally only accessible to the root user. | ||
Deleted: sudo ls -la /root | Added: sudo<strong> ls -la /root</strong> | ||
Unchanged: The first time you use sudo in a session, you will be prompted for the password of the user account. Enter the password to proceed. | Unchanged: The first time you use sudo in a session, you will be prompted for the password of the user account. Enter the password to proceed. | ||
Unchanged: Output: | Unchanged: Output: | ||
Unchanged: [sudo] password for username: | Unchanged: [sudo] password for username: | ||
Unchanged: If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges. | Unchanged: If your user is in the proper group and you entered the password correctly, the command that you issued with sudo should run with root privileges. |
Note: Spaces may be added to comparison text to allow better line wrapping.
Hello! Would you mind if I share your blog with my zynga group? There’s a lot of people that I think would really enjoy your content. Please let me know. Thanks
Hi, it is fine for me 🙂