Bug 112802

Summary: at does not start jobs
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Andreas Vetter <vetter>
Component: OtherAssignee: Mads Martin Joergensen <mmj>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: asklein, edwardsg, forgotten_1GBkbCnI0A, kukuk
Version: Beta 3   
Target Milestone: ---   
Hardware: x86-64   
OS: All   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Andreas Vetter 2005-08-24 19:02:37 UTC
Use at to start a job, it will not be run at all.

Howto reproduce:
Start at daemon
su to  root and type in a shell:
# at now
> mail -s test you@mail.com < /dev/null
>
Press Control-d to exit

Check with atq, that job is still in queue. The job is not executed.
Using a time in approx 2 minutes also does not work.

Works on SL 9.3
Comment 1 Thorsten Kukuk 2005-08-24 20:24:26 UTC
What are the at messages in /var/log/messages? 
Comment 2 Andreas Vetter 2005-08-26 07:42:27 UTC
Aug 26 09:34:41 linux atd[13128]: Cannot make/remove an entry for the specified
session
Comment 3 Andreas Vetter 2005-08-26 07:42:47 UTC
works in beta 3
Comment 4 Andreas Vetter 2005-08-26 08:05:08 UTC
too fast :-(
it only worked one time, then I have the same as in beta 2:
Aug 26 10:01:24 wpyc022 atd[8511]: Cannot make/remove an entry for the specified
session

Perhaps wrong permissions?
# ls -l /var/spool/atjobs
total 21
drwx------   2 at   at    136 Aug 26 10:01 .
drwxr-xr-x  27 root root  696 Aug 25 20:05 ..
-rw-------   1 at   at      6 Aug 26 10:01 .SEQ
-rwx------   1 root root 4648 Aug 26 09:59 =00001011e1cff
-rwx------   1 root root 4648 Aug 26 10:01 =00002011e1d01

I always started jobs as root, not as a user.
Comment 5 Andreas Vetter 2005-08-26 08:18:19 UTC
hmm, so i deleted all jobs with atrm, then stopped and started atd.

I scheduled a new job:
wpyc022:/var/spool # at now
warning: commands will be executed using /bin/sh
at> date
at> <EOT>
job 3 at 2005-08-26 10:13
wpyc022:/var/spool # atq
3       2005-08-26 10:13 = root
wpyc022:/var/spool # atq
3       2005-08-26 10:13 = root
wpyc022:/var/spool # less /var/log/messages
wpyc022:/var/spool # ls -Rl at*
atjobs:
total 13
drwx------   2 at   at    104 Aug 26 10:13 .
drwxr-xr-x  27 root root  696 Aug 25 20:05 ..
-rw-------   1 at   at      6 Aug 26 10:13 .SEQ
-rwx------   1 root root 4698 Aug 26 10:13 =00003011e1d0d

atspool:
total 13
drwx------   2 at   at   144 Aug 26 10:13 .
drwxr-xr-x  27 root root 696 Aug 25 20:05 ..
-rw-------   1 at   at    49 Aug 26 09:59 a00001011e1cff
-rw-------   1 at   at    49 Aug 26 10:01 a00002011e1d01
-rw-------   1 at   at    49 Aug 26 10:13 a00003011e1d0d

You can see the two old jobs (which I "atrm-ed") in atspool. 
Comment 6 Thorsten Kukuk 2005-08-26 08:39:22 UTC
I would expect that you have errors from pam_loginuid in the logs. Please
remove the pam_loginuid line from /etc/pam.d/atd and try it again.
Comment 7 Andreas Vetter 2005-08-26 09:38:15 UTC
Thats right:
Aug 26 10:13:43 wpyc022 pam_loginuid[9066]: set_loginuid failed opening loginuid
Aug 26 10:13:43 wpyc022 pam_loginuid[9066]: set_loginuid failed

Commenting out the pam_loginuid line from /etc/pam.d/atd repairs it.
Comment 8 Thorsten Kukuk 2005-08-26 09:39:56 UTC
Removed.
Comment 9 Thorsten Kukuk 2005-08-29 10:06:29 UTC
*** Bug 113638 has been marked as a duplicate of this bug. ***
Comment 10 Ruediger Oertel 2005-08-29 10:45:10 UTC
*** Bug 113519 has been marked as a duplicate of this bug. ***
Comment 11 Ruediger Oertel 2005-08-29 10:45:31 UTC
*** Bug 113520 has been marked as a duplicate of this bug. ***