Operating System - HP-UX
1819681 Members
3522 Online
109605 Solutions
New Discussion юеВ

How to add user accout to Sudo access list.

 
Eric Jacklin
Regular Advisor

How to add user accout to Sudo access list.

I want to know that if i want to add some existing user to sudo list then please let me know the command so that every time i need not need to change sudoer file.

4 REPLIES 4
Rick Garland
Honored Contributor

Re: How to add user accout to Sudo access list.

To add a user to the sudoer file you will need to use the "visudo" command. This will open the sudoers file and allow you to make the modifications.

You will need to make changes to the sudoers file to grant/deny privs.
Jeff_Traigle
Honored Contributor

Re: How to add user accout to Sudo access list.

The only way to avoid modifying the sudoers file when adding users is to define the command privileges by UNIX group and adding the new user to the appropriate group at the UNIX level. There are examples in the sudo man page.
--
Jeff Traigle
George Liu_4
Trusted Contributor

Re: How to add user accout to Sudo access list.

use sudoer group instead of user
Raj D.
Honored Contributor

Re: How to add user accout to Sudo access list.

Jitendra,

If you want to add some special privilege that has already specified in the sudoers file with a group , you only need to add that user to that group,

# usermod -g group1 user_name

And the use will get all the file permission given to the group1 , that is listed in the sudoers file.

fyi, If you want to check/modify sudoers file you can do with visudo command.

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "