Welcome! Log In Create A New Profile

Advanced

Problem with at jobs on Debian.

Posted by gazza_d 
Problem with at jobs on Debian.
August 21, 2011 01:24AM
On my Pogoplug, I followed the instructions on this site to install debian, and it's running as a web server very sucessfully.

I have installed a web based Home Automation app, called homeautomation, which executes schedules as AT jobs submitted as the www-data user.
The jobs do not complete and just get stuck in the running state.
The only error I see is in the syslog which reports an authentication failure
Aug 21 07:11:00 myth-mbe atd[20883]: Authentication failure

This is the case regardless of what job I try to run.
Running the job as root is OK.

I have checked that www-data is in the at.allow and cron.allow, and not at.deny and cron.deny

does anyone have any idea what might be going on and how I can fix it.
Re: Problem with at jobs on Debian.
August 25, 2011 07:22AM
gazza_d Wrote:
-------------------------------------------------------

> I have installed a web based Home Automation app,
> called homeautomation, which executes schedules as
> AT jobs submitted as the www-data user.
> The jobs do not complete and just get stuck in the
> running state.
> The only error I see is in the syslog which
> reports an authentication failure
> Aug 21 07:11:00 myth-mbe atd[20883]:
> Authentication failure


> Running the job as root is OK.
>
> I have checked that www-data is in the at.allow
> and cron.allow, and not at.deny and cron.deny

I don't know your homeautomation tool, but if you can do at jobs from the console as user and as root, I assume everything is fine with your debian system.
Have you already looked at the at jobs what they are doing and where? I assume file access rights come into the job - so check that. Maybe an at job is doing stuff you have not yet configured?

There are no silly questions
Re: Problem with at jobs on Debian.
August 25, 2011 08:57AM
I have actually managed to resolve this with a lot of effort to track down the issue.

The application is HomeAutomation which is webbased with a MySQL backend, and works with Telldus Tellsticks. I will post instructions on how to do this in the near future

It was possible to submit AT jobs from the app or commandline, but they would not execute, but stick in the running state.

I ended up building a replica box as a virtual machine, as I suspected the problem was a configuration issue with the initial build. That all worked, and as a result, I rebuilt my Pogoplug.

Scheduled jobs still would not work if submitted by the apache user, www-data. They would work from root., and the commands worked from the command line, just not as scheduled tasks. I then started comparing the configurations of he two servers side by side.

I eventually tracked the cause ot the issue late last night, and it was because there was no entry in the shadow file for www-data, although there was an entry in passwd. When I checked the VM, there was an entry in there.

I created an entry by replicating the values from one of the other daemon accounts,and hey presto it worked!

Weird, hard to find, but simple in the end.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: