[NBLUG/talk] Can't get 'at' working correctly

Andrew argonaut at softhome.net
Wed Apr 7 16:37:26 PDT 2004


sms at sonic.net wrote on Fri, 2 Apr 2004 12:34:18 -0800 (PST):

> 
> > This morning, I wanted to fax something at a specific time.
> > For the fun of it, I thought I'd give the "at" utility a
> > spin. I'm using the efax package to send faxes, so I typed
> > this:
> 
> <SNIP>
> 
> 
> Offhand, I don't see "the" answer.  I presume that
>    "fax send 5551212 document.001 [enter]"
> works at the commandline.

Yes, it does. No problems at all.

> Have you forked a new shell
>    /bin/sh
> and tried typing it at *that* commandline?

Yes. Same (negative) result.

> Is "fax" in
> the path for sh?  The initializations for at-run shells
> can sometimes be other than what you'd expect...

Not sure what you mean by "the path for sh". Users have PATH
environment variables, not shells. But anyway, according to the
manpage for at, "the working directory, the environment ... and
the umask are retained from the time of invocation." So when I
create an "at" job as andrew, the job will run as andrew, in
andrew's environment, including the current working directory at
the time the job was created. And yes, "fax" (which is a wrapper
for "efax") is in andrew's path (/usr/bin/fax).

> Can you get *anything* to work via "at"?  Try some "trivial"
> commands via "at", like "touch $HOME/YesATisWorking" and
> "mv thisfile thatfile" and "ls > /tmp/at.test.ls".  Do they
> work?

I can't get *any* "at" jobs to work properly as andrew. I can
create jobs, I can view the queue, and at the time the job is
supposed to run "atq" shows an equal sign next to the job
(meaning it's running), but nothing tangible happens.

I did discover that root has no problems at all with "at". I can
even "su" to root from andrew, set an "at" job, exit from root
and the "at" job will run correctly at the appointed time. So
"at" seems to have a problem with normal users.

>From the manpage: "The superuser may use these commands in any
case. For other users, permission to use at is determined by the
files /etc/at.allow and /etc/at.deny."

On my system, at.allow does not exist. at.deny does exist and
contains users like "guest", "irc", and "nobody". "andrew" is not
in that list. So far, so good. If I put "andrew" in the at.deny
list and then try to create an "at" job, I get "You do not have
permission to use at." I am not allowed to create a job at all.
So that's what it looks like when a user is actively denied. If I
remove andrew from the at.deny list, create at.allow and put
"andrew" in it, I'm back to square one: I can create jobs, but
they don't run correctly.

Any more thoughts on what else to check would be *mucho*
appreciated. I'd hate to have to run "at" as root whenever I
needed it.

Thanks,

A.




More information about the talk mailing list