LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Query related to sudo? (https://www.linuxquestions.org/questions/linux-newbie-8/query-related-to-sudo-720807/)

your_shadow03 04-21-2009 11:08 PM

Query related to sudo?
 
Hello Guys,
I have Ubuntu 8.10 running on my HP Proliant. I have created a user with name "tux" during the installation.Whenever I need to perform any action I just provide :
Code:

$ sudo /etc/init.d/networking restart
This ask me for password and it goes fine.

Now I have created a user called joe. Now when i perform any operation it says:
Code:


$ pwd
/home/joe
$ sudo fdisk -l
[sudo] password for joe:
joe is not in the sudoers file.  This incident will be reported.

Now I know that we need make entry for joe in sudoers. I cant give him root permission as:
Code:

root    ALL=(ALL) ALL
I cant write :
joe ALL=(ALL) ALL

I have been using Red Hat for long time. Just want to know what exact entry I should make for this user if I want to give him specific permission.

wet-willy 04-21-2009 11:47 PM

Go to System/Administration/Users_And_Groups and hit the Unlock button as tux, enter tux password. Tux belongs to the admin group. Here you can add a new user, this may be where you may have added joe. Highlight joe and hit properties/user_priviledges and put a check in the box next to "Administer system".
Although I have not tried this, you probably do not have to add anything in /etc/sudoers for joe as there is already an entry for those belonging to the admin group.

wet-willy 04-22-2009 12:21 AM

Also, to edit the /etc/sudoers file, issue command:$ sudo visudo

To only allow this new user certain privileges instead of admin powers, look at section "Only allowing a user to run a particular command" in this howto --> http://www.wlug.org.nz/SudoHowto


All times are GMT -5. The time now is 01:11 PM.