LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-24-2006, 03:49 PM   #1
aaron4katie
Member
 
Registered: Dec 2006
Location: Bristol, England
Distribution: Fedora Core 6
Posts: 77

Rep: Reputation: 15
Adding My Name To Sudo In Fedora Core 6, I Have Unlucky Tries


Firstly can someone tell me what visudo is, is it just typing the command vi and then locating the sudoers file like this...

Code:
vi /etc/sudoers
because that is what I have been doing, as root of course but I cannot get my username called Aaron, to even use the sudo command, it asks for the password but once entered it says Aaron is not in the sudoers file.

I've tried adding or removing different things in the file but I still can't use it using Aaron, root can use it fine without asking for password.

I'm sure that it wasn't just a capital letter problem or a typo. It's annoying using the su command just to install something via yum. I know how to save the file .. :w.

Anybody help in newbie English or something?

PS: I've looked at instructions via google search and these forums but no luck.

Last edited by aaron4katie; 12-24-2006 at 03:50 PM.
 
Old 12-24-2006, 03:55 PM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
You're editing the file correctly. In addition to editing the file you might also need to add your user to the group called sudoers, either using some graphical tool or by editing file /etc/group (the file's contents should show you how to do that).

Instead of adding that single user to the sudoers file, you could as well let some specific group be able to use sudo (usually a group called wheel) and then add your user to that group. I think this is the preferred method. Usually the file /etc/sudoers already contains a line that lets users in wheel group use sudo, one just has to uncomment the line (take #-mark out of the line's beginning). The file should contain some examples which you can base this thing on, if the file doesn't already have a line for wheel group. The line just contains the group name and the word ALL twice (to let the users in that group access all commands with password used; there's a special nopass option to let use sudo without password, but don't do that if you don't know exactly what you're doing). Manpage of sudo also contains all the relevant information.

So:

1) edit /etc/sudoers and uncomment or write a line where users in a specific group (preferred this way, not just single users) can access sudo (ALL:ALL)
2) edit /etc/group and add the user into the groups sudoers (if it exists; if not, you may have to create it, but not always -- depends on your distribution, refer to the manpage of sudo) and the group you added to the sudoers file (usually wheel).
 
Old 12-24-2006, 05:21 PM   #3
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
You should not be editing the sudoers file directly. You should use the visudo command, as syntax errors will cause the sudo command to ignore the entries. See 'man sudoers' and 'man visudo'.
 
Old 12-26-2006, 06:23 AM   #4
aaron4katie
Member
 
Registered: Dec 2006
Location: Bristol, England
Distribution: Fedora Core 6
Posts: 77

Original Poster
Rep: Reputation: 15
I added the wheel file to sudoers and that didn't help me, but I went to administration and then users and groups and added my username to the wheel group, so I'm ok now.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding and Adding Channels For Fedora Core 2 caal Linux - Newbie 1 11-05-2006 09:49 AM
how to add new users in fedora core 4 and allow them to use sudo for some commands y2k6summi Linux - Security 1 03-29-2006 09:38 AM
Adding a Drive with Fedora Core 3 SSH Tha relliK Linux - Hardware 0 12-22-2004 08:53 PM
Adding items to kmenu in Fedora Core 2 gypsy_rabbi Linux - Newbie 5 09-17-2004 04:47 PM
Adding a new hard drive to Fedora Core yong_sa Fedora 1 07-17-2004 05:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration