'at' command and apache user
Rick Stevens
ricks at nerd.com
Fri Jun 17 00:40:18 UTC 2011
On 06/16/2011 04:41 PM, Cameron Simpson wrote:
> On 16Jun2011 18:58, Gary Stainburn <gary.stainburn at ringways.co.uk> wrote:
> | Hopefully this is a quickie. I've written a Perl script which
> |
> | 1) I call to initialise - this then schedules another run using the 'at'
> | command
> |
> | 2) is run by 'at' at the appropriate time to carry out the required task
> |
> | This works fine under the developer user but when I call it from PHP in my web
> | server the 2nd part fails and generates the following email.
> |
> | Subject: Output from your job 17
> | From: Apache <apache at ringways.co.uk>
> | To: apache at ringways.co.uk
> | Date: Today 18:51:00
> |
> | This account is currently not available.
> |
> | I have tried creating /etc/at.allow and adding apache. /etc/at.deny us empty
> |
> | it still doesn't work. Can anyone suggest what I need to do next please.
>
> Might the account be "locked"? Check out the /etc/shadow file - "!!"
> instead of "x" in the crypt field. May as well check the account has a
> shell too: /bin/sh instead of /bin/false.
Indeed, that's it. The "at" command runs a shell as the user who
submitted the job. User "apache" generally is not a valid login user
(can't run a shell), so the "at" job can't run.
Note that this is also true if you try to do cron jobs for a user that
hasn't got shell access.
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, C2 Hosting ricks at nerd.com -
- AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 -
- -
- You possess a mind not merely twisted, but actually sprained. -
----------------------------------------------------------------------
More information about the users
mailing list