LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 03-27-2012, 02:02 PM   #1
khinch
Member
 
Registered: Apr 2007
Location: Carlisle, UK
Distribution: Debian
Posts: 73

Rep: Reputation: 18
User is not in the sudoers file


Hi, I'm new to Debian although I've been using Linux for a while. I just completed a fresh install of Debian 6.0.4 and started to configure my system the way I like it. I tried to give myself sudo privileges:
  • I added "wheel ALL=(ALL) ALL" to the end of the sudoers file using visudo
  • I then typed "addgroup wheel"
  • then "adduser <username> wheel" (obviously substituting my own username for <username>)
I then logged out and back in again, and thought this would be enough to give myself sudo privileges, but I still get the message "<user> is not in the sudoers file. This incident will be reported".

If I add myself to the sudoers file manually it works fine, so I can get around this problem. But, why doesn't it work via the wheel method? It seems much easier to administer users of a system if I can just add them to wheel instead of adding them to the sudoers file manually.

Any help much appreciated.
 
Old 03-27-2012, 02:04 PM   #2
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,733
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
Why mess with sudo at all? How hard is it to do su?

adduser name sudo

$ groups
craig lp cdrom floppy sudo audio dip video plugdev users netdev lpadmin powerdev scanner debian-tor
 
Old 03-27-2012, 04:44 PM   #3
khinch
Member
 
Registered: Apr 2007
Location: Carlisle, UK
Distribution: Debian
Posts: 73

Original Poster
Rep: Reputation: 18
Thanks for replying.

It's not hard to su, but I've had issues in the past with applications that need to run as myself, but with sudo privileges. Truecrypt for instance. I seem to recall the only way I can mount encrypted volumes with truecrypt is if it runs as myself via sudo.

I tried adding myself to the sudo group, but the error still occurs. The only thing that seems to work is adding my username into the sudoers file manually (username ALL=(ALL) ALL). I just wondered if there was a reason why, and if there's a more elegant way around it.
 
Old 03-27-2012, 04:47 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,592
Blog Entries: 2

Rep: Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046Reputation: 4046
Quote:
Originally Posted by khinch View Post
I added "wheel ALL=(ALL) ALL" to the end of the sudoers file using visudo
Shouldn't that be
Code:
%wheel ALL=(ALL) ALL
Otherwise sudo mistakes wheel for a user, not a group.
 
1 members found this post helpful.
Old 03-27-2012, 06:17 PM   #5
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid
Posts: 4,733
Blog Entries: 12

Rep: Reputation: 456Reputation: 456Reputation: 456Reputation: 456Reputation: 456
My sudoers file has:

Code:
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
Rather than wheel and my user is in the sudo group.

Never used Truecrypt, I encrypt my entire drive during install and use ccrypt for individual files/folders.

ccrypt
Quote:
Description-en: secure encryption and decryption of files and streams
ccrypt is a utility for encrypting and decrypting files and streams. It was
designed as a replacement for the standard unix crypt utility, which is
notorious for using a very weak encryption algorithm. ccrypt is based on the
Rijndael cipher, which is the U.S. government's chosen candidate for the
Advanced Encryption Standard (AES, see http://www.nist.gov/aes). This cipher is
believed to provide very strong security.
 
Old 03-28-2012, 12:27 PM   #6
khinch
Member
 
Registered: Apr 2007
Location: Carlisle, UK
Distribution: Debian
Posts: 73

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by TobiSGD View Post
Shouldn't that be
Code:
%wheel ALL=(ALL) ALL
Yes. And I didn't have the % at the start. Problem solved.

Thanks!

Edit: Thanks to craigevil too. I use Truecrypt for cross platform compatibility btw.

Last edited by khinch; 03-28-2012 at 12:29 PM.
 
  


Reply

Tags
debian, sudo, wheel


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
'user' not in the sudoers file thomas2004ch Linux - Software 6 05-24-2011 10:20 AM
User not in the sudoers file ersek Linux - Newbie 10 06-09-2009 12:35 PM
Adding a user to the sudoers file? annihilan Slackware 5 11-13-2008 04:36 PM
how a user can be added to sudoers file. afaheem1988 Linux - Newbie 5 08-10-2008 07:15 PM
Debian user not in sudoers file... phantom_cyph Linux - General 3 04-08-2007 01:08 PM


All times are GMT -5. The time now is 02:42 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