Public bug reported:

How to reproduce:

* Have a sssd user with a @reboot task:
# crontab -lu sssd-user
@reboot date > /tmp/$LOGNAME-crontab
* reboot
* the task was not started. look at systemctl logs:
#  systemctl status cron
● cron.service - Regular background program processing daemon
   Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: 
enabled)
   Active: active (running) since jeu. 2016-06-16 17:58:15 CEST; 5min ago
     Docs: man:cron(8)
 Main PID: 931 (cron)
   CGroup: /system.slice/cron.service
           └─931 /usr/sbin/cron -f

juin 16 17:58:15 hostname systemd[1]: Started Regular background program 
processing daemon.
juin 16 17:58:15 hostname cron[931]: (CRON) INFO (pidfile fd = 3)
juin 16 17:58:17 hostname cron[931]: (CRON) INFO (Running @reboot jobs)
juin 16 17:58:18 hostname CRON[1068]: pam_sss(cron:account): Request to sssd 
failed. Connexion refusée
juin 16 17:58:19 hostname cron[931]: Le service d'authentification n'a pas pu 
récupérer les informations d'authentification

# systemctl status sssd.service 
* sssd.service - System Security Services Daemon
   Loaded: loaded (/lib/systemd/system/sssd.service; enabled; vendor preset: 
enabled)
   Active: active (running) since Thu 2016-06-16 17:58:29 CEST; 7min ago
  Process: 878 ExecStart=/usr/sbin/sssd -D -f (code=exited, status=0/SUCCESS)
 Main PID: 1167 (sssd)
   CGroup: /system.slice/sssd.service
           |-1167 /usr/sbin/sssd -D -f
           |-1168 /usr/lib/x86_64-linux-gnu/sssd/sssd_be --domain default --uid 
0 --gid 0 --debug-to-files
           |-1214 /usr/lib/x86_64-linux-gnu/sssd/sssd_nss --uid 0 --gid 0 
--debug-to-files
           |-1215 /usr/lib/x86_64-linux-gnu/sssd/sssd_pam --uid 0 --gid 0 
--debug-to-files
           `-1216 /usr/lib/x86_64-linux-gnu/sssd/sssd_sudo --uid 0 --gid 0 
--debug-to-files

Jun 16 17:58:15 hostname systemd[1]: Starting System Security Services Daemon...
Jun 16 17:58:28 hostname sssd[1167]: Starting up
Jun 16 17:58:29 hostname sssd[be[1168]: Starting up
Jun 16 17:58:29 hostname systemd[1]: Started System Security Services Daemon.
Jun 16 17:58:29 hostname sssd[1216]: Starting up
Jun 16 17:58:29 hostname sssd[1215]: Starting up
Jun 16 17:58:29 hostname sssd[1214]: Starting up

As you can see, the @reboot jobs are started a few seconds before my
sssd domain.

* How to fix it
Tell systemd to start cron after sssd.
File /lib/systemd/system/cron.service, section [unit], add
After=sssd.service

This patch seems to have no effect on systems with no sssd service

** Affects: cron (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: xenial

** Tags added: xenial

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1593317

Title:
  @reboot jobs don't start for sssd users

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cron/+bug/1593317/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to