LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 04-04-2006, 10:34 AM   #1
krusty_lab
LQ Newbie
 
Registered: Oct 2005
Location: rom,italy
Distribution: redhat,fedora,AIX
Posts: 24

Rep: Reputation: 15
SUDO and pipe


Hy , iwant to let execute an user this command with sudo
/usr/bin/ps -fluoracle | /usr/bin/grep bmsRuntime
i had tried in sudoers file
esr ALL=(oracle) NOPASSWD: /usr/bin/ps -fluoracle | /usr/bin/grep bmsRuntime
and this
esr ALL=(oracle) NOPASSWD: sh -c "/usr/bin/ps -fluoracle | /usr/bin/grep bmsRuntime"
but it don't function i think that the problem is the pipe, if i do as user esr
sudo -u oracle /usr/bin/ps -fluoracle | /usr/bin/grep bmsRuntime
or
sudo -u oracle sh -c "/usr/bin/ps -fluoracle | /usr/bin/grep bmsRuntime"
sudo ask me for the password, if i insert the password the sudo say:
Sorry, user esr is not allowed to execute '/usr/bin/sh -c ps -fluoracle|grep bmsRuntime' as oracle on cdpris19.



anybody can help
Thank you
 
Old 04-04-2006, 10:14 PM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Is the user ers a member of the wheel group???

$ cat /etc/group | grep wheel
wheel:x:10:root,ers
 
Old 04-05-2006, 02:49 AM   #3
krusty_lab
LQ Newbie
 
Registered: Oct 2005
Location: rom,italy
Distribution: redhat,fedora,AIX
Posts: 24

Original Poster
Rep: Reputation: 15
is'not a member of the whel group, but i don't think that is the problem, becouse if i add a line like this:
esr ALL=(oracle) NOPASSWD: /usr/bin/ps -ef
it work

krusty
 
  


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: broken pipe TiMiN8R Mandriva 3 09-17-2009 02:31 PM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
2-way pipe saiz66 Programming 3 11-22-2004 07:54 AM
pipe jelly Slackware 2 03-05-2003 03:07 AM
who with a pipe blown99GT Linux - General 5 07-16-2002 02:58 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:57 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
Open Source Consulting | Domain Registration