Home Man
Today's Posts

Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Sudo command problem


Login to Reply

Thread Tools Search this Thread
# 1  
Old 03-12-2009
Sudo command problem

Hi All,

I am tring to redirect mails comming to my user id to a script. In other word trigger a script when a mail comes to my user id.

Actually , Admin team has done all this to me previously. in my script i am doing like
/usr/local/bin/sudo -u parbrxs /export/home/parbrxs/bin/parbrxs.sh

it was working fine and it was able to trigger parbrxs.sh.
Now problem is, i want to change my script name from parbrxs.sh to abhishek_test.sh.

But this is giving error,

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

Sorry, try again.
Sorry, try again.
Sorry, try again.
sudo: 3 incorrect password attempts

can any one please tell me what is the exact problem? Is there any settings i am missing?
# 2  
Old 03-12-2009
The admins probably created a NOPASSWD rule for that specific command (path and all) in the sudoers file. If you change it, that rule no longer catches, and so the password prompt is displayed.
# 3  
Old 03-12-2009
Thanks pludi .

But these is no sudoer file in /etc folder. Is there any other path or file where these setting can be done.
# 4  
Old 03-12-2009
visudo will allow the admins to edit the sudoers file (wherever it may sit). But it's not possible for a user to change or even view that file (although that last statement is not always true)
# 5  
Old 03-17-2009
Thanks paludi,
Ad i told , My main requirement is to trigger a script "abhishektest.sh "whenever a mail come to a user say "abhishek" in my unix server. I dont have root permission.
So, for doing this
1) in /etc/mail/aliases : i need to ask admin to configure so that mail will route through a script.
abhishek : "|/export/home/abhishek/bin/wr_test.sh
2) in wr_test file : i need to put this line, as i have to switch user from root to abhishek.
/usr/local/bin/sudo -u abhsihek /export/home/abhishek/bin/abhishektest.sh
and ask admin to set NOPASSWD rule for this command.

Please let me know if anything wrong in this procedure.or anything else need to be added.

Last edited by mindtee_abhi; 03-17-2009 at 04:34 AM..
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem using sudo with NOPASSWD aigini82 HP-UX 3 04-12-2016 04:17 AM
ssh foo.com sudo command - Prompts for sudo password as visible text. Help? fluoborate Shell Programming and Scripting 9 11-02-2011 02:18 PM
Problem with Sudo inside a here document mnanavati UNIX for Dummies Questions & Answers 0 11-12-2010 03:23 PM
Problem with password expire and sudo. sparcman Solaris 2 04-14-2010 01:18 PM
Sudo Problem? datkan Linux 1 04-08-2010 07:58 AM
Unable to use the Sudo command. "0509-130 Symbol resolution failed for sudo because:" Chloe123 UNIX for Dummies Questions & Answers 1 12-21-2009 04:09 PM
shell script problem , sudo mount command cola Shell Programming and Scripting 3 08-19-2009 02:09 PM
Sudo command sophos UNIX for Advanced & Expert Users 1 07-31-2009 03:33 PM
Sudo for a command synchro Solaris 1 03-17-2008 01:32 AM
problem with sudo su and .sh script cleansing_flame Shell Programming and Scripting 1 01-14-2008 02:32 PM

All times are GMT -4. The time now is 11:43 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password