LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-02-2006, 09:50 PM   #1
Efwis
LQ Newbie
 
Registered: Dec 2006
Location: Iowa USA
Distribution: Ubuntu 6.06 LTS
Posts: 6

Rep: Reputation: 0
How do I get sudo to work?


hi everyone,

I'm not exactly new to Linux, been using it for almost a year now. But I am new to Slackware.

I just installed Slackware 11.0 and cant' figure out how to give my non-root user Sudo access. I entered the user in the sudoers file with the All command, but when I go to use sudo I get the following error.

Quote:
edward is not allowed to run sudo on edward. This incident will be reported.
below is a copy of my sudoers file entries, did I put something in there wrong or did I miss some info when I set it up.

Code:
# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root	ALL=(ALL) ALL
edward  All=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
# %wheel	ALL=(ALL)	ALL

# Same thing without a password
# %wheel	ALL=(ALL)	NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now
Any help would be appreciated.
 
Old 12-02-2006, 10:05 PM   #2
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
¿Why don't you just add user edward to group wheel and uncomment the line that allow group wheel to run all commands? That enhance your administration of privileged users.
 
Old 12-02-2006, 10:24 PM   #3
Efwis
LQ Newbie
 
Registered: Dec 2006
Location: Iowa USA
Distribution: Ubuntu 6.06 LTS
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by runnerfrog
¿Why don't you just add user edward to group wheel and uncomment the line that allow group wheel to run all commands? That enhance your administration of privileged users.
If I see correctly, that eliminates the need of using a password. This is not acceptable since I am only wanting the one user on the system besides Root. My Kids use this system also, and I don't want to take a chance of them breaking the install by accidentally removing a file. they may be young, but that can also make them more dangerous to an OS.
 
Old 12-02-2006, 10:27 PM   #4
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 30
I believe "ALL" needs to be all caps.
Code:
# User privilege specification
root	ALL=(ALL) ALL
edward  All=(ALL) ALL
Code:
edward  ALL=(ALL) ALL
 
Old 12-02-2006, 10:34 PM   #5
runnerfrog
Member
 
Registered: Jul 2006
Location: Paraná, Argentina
Distribution: Frugalware 0.6 (Terminus) - Kubuntu 7.04 (Feisty Fawn Herd 5)
Posts: 217

Rep: Reputation: 31
Quote:
Originally posted by Efwis:
If I see correctly, that eliminates the need of using a password.
That is incorrect, Efwis. If you uncomment this only line (the one i said):
Quote:
# %wheel ALL=(ALL) ALL
your sudoers (user edward) will need to enter their personal password, _only_ the users you add to group wheel, will have the privilege.
 
Old 12-02-2006, 10:59 PM   #6
Efwis
LQ Newbie
 
Registered: Dec 2006
Location: Iowa USA
Distribution: Ubuntu 6.06 LTS
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by runnerfrog
That is incorrect, Efwis. If you uncomment this only line (the one i said):

your sudoers (user edward) will need to enter their personal password, _only_ the users you add to group wheel, will have the privilege.
thanks for that info. when I went to use sudo after setting that it didn't ask for my password when I was expecting it to. thats why I figured that was the case.

Quote:
Originally Posted by zetabill
I believe "ALL" needs to be all caps.
you were correct, that is what I did wrong, I didn't even catch that little typo

Thanks to both of you I now have that fixed. Just so you know I went with the route I was trying before using
Code:
# User privilege specification
root	ALL=(ALL) ALL
edward  ALL=(ALL) ALL
I will remember the wheel part if the need arises.
 
Old 12-03-2006, 10:19 AM   #7
hitest
Senior Member
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 4,141

Rep: Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523Reputation: 523
Hey Efwis,

Just saw your post here. Glad you got that sorted out man:-) Efwis is a buddy of mine:-) Welcome to the LQ Slackware forum!!
To simplify things for me I usually add my user to the wheel group and cdrom group when I set-up my user account when I first install Slackware.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
su works but sudo doesn't work. magnum81 Ubuntu 2 04-22-2006 10:52 PM
sudo does not work powah Linux - Security 1 12-06-2005 04:49 PM
sudo doesn't work oomfoofoo Debian 3 08-13-2005 07:34 AM
sudo doesn't work mla Linux - Software 1 10-01-2003 08:24 PM
sudo doesn't work mla Linux - Software 4 10-01-2003 07:34 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration