LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-20-2009, 06:20 AM   #1
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Rep: Reputation: 15
configure /etc/sudoers for passwords


Hi,

One of my (most trusted) users will need to become root to run a set of maintenance tasks over the next few weeks. Rather then give away the root password I'd like to be able to run a bash shell through sudo.

I've edited the /etc/sudoers with the following extra line:


User1 ALL=/bin/bash


The problem is that we can now run bash as root WITHOUT typing is a password.

I thought the default was the opposite way round; the user would have to enter the password unless I add the "NOPASSWD: ALL" flag to the end of the line.

Any ideas what I'm doing wrong?
 
Old 04-20-2009, 09:00 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Quote:
can now run bash as root
Are you running the sudo command as root or as User1? root will not be prompted for a password. User1 should.

You may try:
Code:
User1 ALL=PASSWD: /bin/bash
or to grant him everything:
Code:
User1 ALL=(ALL) ALL

Last edited by AlucardZero; 04-20-2009 at 09:04 AM.
 
Old 04-20-2009, 09:03 AM   #3
fpmurphy
Member
 
Registered: Jan 2009
Location: /dev/ph
Distribution: Fedora, Ubuntu, Redhat, Centos
Posts: 299

Rep: Reputation: 62
Try placing this line before any lines that contain NOPASSWD
 
Old 04-21-2009, 02:40 AM   #4
stormcloud
Member
 
Registered: Apr 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Hi,

I've made the changes you both suggest and it now works perfectly.

Thanks :^)
 
  


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
how to convert user passwords and group passwords using pwconv? dolceinter1 Linux - Security 2 11-04-2008 10:03 PM
Configure sudoers with cfengine glowe Linux - Software 2 06-22-2008 03:26 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
Sync MySQL passwords with local account passwords? turbine216 Linux - Software 2 02-18-2005 03:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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