LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how a user can be added to sudoers file. (https://www.linuxquestions.org/questions/linux-newbie-8/how-a-user-can-be-added-to-sudoers-file-660340/)

afaheem1988 08-04-2008 08:49 AM

how a user can be added to sudoers file.
 
how a user can be added to sudoers file

checkmate3001 08-04-2008 08:51 AM

run the command visudoer.
It will allow you to edit the file. Of course you likely have to have privledges.

trickykid 08-04-2008 09:03 AM

Quote:

Originally Posted by checkmate3001 (Post 3236228)
run the command visudoer.
It will allow you to edit the file. Of course you likely have to have privledges.

Actually the command should just be visudo, at least from my experience on most distributions.

robogymnast 08-06-2008 09:30 PM

Also, be sure that to become root you use
Code:

su -
so that you inherit root's path (visudo is in /usr/sbin)

checkmate3001 08-10-2008 07:10 PM

trickykid: Thanks for correcting me on that one. My mistake.

jschiwal 08-10-2008 07:15 PM

Most distro's have a group named "wheel" and you just need to make the user a member of the wheel group. Then look for the line near the end of the sudoers file with "%wheel". On a new installation you may need to uncomment the line.

Change the line like:

Code:

# Uncomment to allow people in group wheel to run all commands
# %wheel  ALL=(ALL) ALL

and remove the "# " to uncomment the line:
Code:

# Uncomment to allow people in group wheel to run all commands
%wheel  ALL=(ALL) ALL



All times are GMT -5. The time now is 12:26 PM.