LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 01-17-2008, 06:12 PM   #1
everett-tek
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
sudoers problem with using NOPASSWD in conjuction with runas


I'm trying to use the line below, and per the man page, it should work:

bob ALL=(oracle) NOPASSWD: /dba/job/some-script

If i remove "(oracle)", the script runs fine with no passwd prompt.
But, i want this script to run as oracle AND not prompt for passwd.

Any ideas?

Thanks,

Everett
 
Old 01-17-2008, 06:39 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
I agree the entry looks fine (according to the man page).

How about the following, it cheats a little, but may help:

bob ALL=NOPASSWD: su oracle -c /dba/job/some-script
 
Old 07-28-2009, 06:31 AM   #3
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Rep: Reputation: 15
Hi,

I have the exact same issue. How did U overcome this?. I tried the suggested but with no luck.


Quote:
Originally Posted by everett-tek View Post
I'm trying to use the line below, and per the man page, it should work:

bob ALL=(oracle) NOPASSWD: /dba/job/some-script

If i remove "(oracle)", the script runs fine with no passwd prompt.
But, i want this script to run as oracle AND not prompt for passwd.

Any ideas?

Thanks,

Everett
 
Old 07-29-2009, 08:36 PM   #4
everett-tek
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Here's the clips from my sudoers file... it works.

Regards,

Everett
----------------
User_Alias OC4J=kintana,oracle

Cmnd_Alias OC4J_CMNDS=/dba/job/deploy_oc4j_dcm.sh,\
/dba/job/deploy_oc4j_admin.sh,\
/dba/job/deploy_bounce_oc4j.sh,\
/dba/job/bounce_oc4j.sh

# Defaults specification

Defaults:OC4J runas_default=oracle
OC4J OC4JHOSTS=NOPASSWD: OC4J_CMNDS
 
  


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
/etc/sudoers problem Braynid Linux - Newbie 4 10-21-2006 10:11 AM
SSH nopasswd login UltraSoul Solaris / OpenSolaris 3 06-20-2006 01:13 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 06:03 PM
Sudoers problem hinetvenkat Linux - Security 3 05-14-2005 12:47 PM
sudoers problem kzar Linux - General 5 12-09-2004 05:59 PM


All times are GMT -5. The time now is 04:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration