Operating System - HP-UX
1747983 Members
4464 Online
108756 Solutions
New Discussion

Sudo version 1.8.3p1 problem?

 
SOLVED
Go to solution
Tom Wolf_3
Valued Contributor

Sudo version 1.8.3p1 problem?

Hello all.

We're running Sudo version 1.8.3p1 on an HP-UX 11.31 ia64 server.

We have an account called user1 configured in /etc/sudoers to run many commands including the following

/usr/bin/ksh
/opt/bin/submit
/usr/bin/at

 

Despite this, we're getting the following error.

 

$ sudo -i -u user1 "echo /opt/bin/submit DATA | at now"
ksh: echo /opt/bin/submit DATA | at now: not found

 

The account running this sudo command is also configured in /etc/sudoers.

Any ideas why the "ksh:....not found" error is being generated.

Is this a sudo or perhaps a ksh $PATH issue?

Any help would be appreciated.

Thanks everyone.

2 REPLIES 2
Dennis Handly
Acclaimed Contributor

Re: sudo version 1.8.3p1 problem?

>ksh: echo /opt/bin/submit DATA | at now: not found

 

Are you sure you're suppose to quote the whole command?  The ksh error indicates the shell got:

"echo /opt/bin/submit DATA | at now"  # as one token

 

I suppose you could do:

sudo -i -u user1 ksh -c  "echo /opt/bin/submit DATA | at now"

Or better:

echo /opt/bin/submit DATA | sudo -i -u user1 at now

Tom Wolf_3
Valued Contributor
Solution

Re: sudo version 1.8.3p1 problem?

Hello Dennis.

Thanks for the feedback.

In the past we always enclosed the entire command in quotes - at least we did with previous versions of sudo (sudo-1.7.1).

With this version of sudo, that doesn't seem to work, however the command you provided...

 

sudo -i -u user1 ksh -c  "echo /opt/bin/submit DATA | at now"

 

...does work.

 

Thanks again for the help.