LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2005, 05:39 PM   #1
sh4d0w13
Member
 
Registered: Feb 2005
Posts: 74

Rep: Reputation: 15
sudo wont allow user


for some reason whenever I try to run sudo, and I enter my password, I get this result. "sh4d0w13 is not allowed to run sudo on localhost. This incident will be reported." I think this has to do witht he fact that I kept hitting enter the first time after typing sudo, and it said something about reporting me or something. But when I su and use visudo I wrote "sh4d0w13 ALL=(ALL) NOPASSWD: ALL". Any suggestions on helping me fix sudo would relaly be appreciated!
 
Old 08-17-2005, 06:36 PM   #2
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
I believe that the line ought to be
sh4d0w13 ALL=(root) ALL

to allow you to run anything as root (with a tab in between your username and the first ALL, not spaces (can't type 'em here, it keeps tabbing between elements of the form >_<)).
 
Old 08-17-2005, 06:39 PM   #3
PenguinPwrdBox
Member
 
Registered: Oct 2003
Posts: 568

Rep: Reputation: 31
Firstly, if this is your personal machine, there is no need for sudo.
You can su - to perform administrative tasks. The point of this, is so that you don't accidentally do something stupid (ask anyone who has used unix for a while - you'll get a story .

By using sudo, you are bypassing that restriction, allowing you do make a mistake when you are not root, and that is a bad idea.

Your visudo syntax is correct, however, I think you misunderstand how it works. Sudo by itself does nothing for you. If you wanted to configure an interface, for example, you would type:
Code:
sudo ifconfig
The sudo command requires a command that you would like to run right afterward. It will parse /etc/sudoers, and make sure you have the permission to run that command.

Try it again - sudo init

You should get a usage prompt.
 
  


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
SUDO - allow user joe to SU to usera sajjad02 Linux - Newbie 1 03-10-2005 01:25 PM
change to unprivileged user without sudo? german Linux - Security 2 01-28-2005 01:32 PM
Sudo User Error ! LinuxRam Linux - Security 6 08-28-2004 10:03 PM
SUDO as *non-root* user spratty Linux - Newbie 3 05-19-2004 03:35 AM
track sudo user mikeshn Linux - General 2 10-28-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:36 PM.

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