Operating System - HP-UX
1833881 Members
1908 Online
110063 Solutions
New Discussion

Re: can not get at to work properly

 
Krister Enger
Advisor

can not get at to work properly

Trying to get an at command to work

echo "cat /etc/passwd | mailx -s \"Test\" user@host" | at now + 1 minute

Running only:
cat /etc/passwd | mailx -s \"Test\" user@host
works fine

When I run:
at -l
I can see that a job is listed there and it dissappears from after one minute. Same thing with /var/spool/cron/atjobs
The at-job is also noted in cron's logfile with no error messages.

No error messages are found.
I run as root and root is in the at.allow file, there is no at.deny file

Any suggestions??
//Krister
4 REPLIES 4
David Bonham_1
Advisor

Re: can not get at to work properly

If anyone is viewing this thread on a Windows box and their Norton/Symantec anti-virus pops-up complaining about the unix.penguin virus don't worry!

Norton thinks the line: cat password file piped to mail is a malicious shell script.

See: http://securityresponse.symantec.com/avcenter/venc/data/pf/unix.penguin.html

>/dev/null
Patrick Wallek
Honored Contributor

Re: can not get at to work properly

What if you do this.

Put you command in a file:

# cat /tmp/testfile
cat /etc/passwd | mailx -s Test user@host

Make sure the file is ececutable:
# chmod 500 /tmp/testfile
Now try this at command:

# at -f /tmp/testfile now + 1 minute
Michael Schulte zur Sur
Honored Contributor

Re: can not get at to work properly

Hi,

The at runs fine on our systems.
Do you have any mail saying that the mail didn't go through or is there any error in mail log?

greetings,

Michael
Gary L. Paveza, Jr.
Trusted Contributor

Re: can not get at to work properly

Why are you using the echo "cat..." command? If you're trying to get the output of the cat /etc/passwd to be mailed, you would eliminate the echo. The way you have it now, it echo's the line "cat /etc/passwd | mailx -s....". If anything, I would expect that the user ID that this is running under to get an email with the output of the echo command - no email would be generated from the mailx command (since it isn't being executed"