3

For some reason I can't use at command from an ordinary user

$ at
You do not have permission to use at.

I've checked my /etc/at.deny, it doesn't have my user there. There is no /etc/at.allow. I tried to restart atd, but it doesn't help.

Any ideas?

Thanks in advance.

kepkin
  • 143
  • 1
  • 5

4 Answers4

2

running

$ strace at
setreuid32(1000, 1000)                  = 0
setregid32(1000, 1000)                  = 0
open("/etc/at.allow", O_RDONLY)         = -1 ENOENT (No such file or directory)
setregid32(1000, 1000)                  = 0
setreuid32(1000, 1000)                  = 0
setreuid32(1000, 1000)                  = 0
setregid32(1000, 1000)                  = 0
open("/etc/at.deny", O_RDONLY)          = -1 EACCES (Permission denied)
setregid32(1000, 1000)                  = 0
setreuid32(1000, 1000)                  = 0
write(2, "You do not have permission to us"..., 38You do not have permission to use at.
) = 38
exit_group(1)                           = ?

could show you the reason.

1

Does /etc/at.allow exist? If it does, any users which aren't explicitly listed in it are prevented from running at.

Andy Smith
  • 1,798
  • 13
  • 15
  • no, it doesn't exist. I have an Ubuntu 9.10 to compare with here. But didn't find any differences yet :-( – kepkin Feb 15 '10 at 18:50
0

What are the permissions under /var/spool/cron? On my 8.04 system it is:

drwxrwx--T 2 daemon daemon  4096 Feb 18 08:36 atjobs
drwxrwx--T 2 daemon daemon  4096 Feb 20  2007 atspool
kmarsh
  • 3,103
  • 15
  • 22
  • Thanks for this hint. There is no /var/spool/at directory on Ubuntu, but there are /var/spool/cron/atjobs and /var/spool/cron/atspool. Both had other permissions, that working Ubuntu installation has. But still it didn't solved the problem :-( – kepkin Feb 16 '10 at 06:28
  • Sorry. I'll edit the post with the correct files/permissions. – kmarsh Feb 18 '10 at 13:37
0

Ok, here I've found a simple solution so far.

sudo aptitude purge at
sudo aptitude install ubuntu-standard

Note: when you delete at package, ubuntu-standard is also deleted as it requires at. So installing ubuntu-standard again cause at installation too

Upd: I reproduced (unintentionally) this issue on other machine. It turned out that the real problem was in /etc/at.deny permissons! atd couldn't read the file.

kepkin
  • 143
  • 1
  • 5