简体   繁体   中英

incron - table for invalid user - after reboot - ubuntu 18.04

I use incron to check what happen on several folder outside of user's home, like:

/folder/tmp/pdf-writer-work/AD_User_Login IN_MOVED_TO pdf-firefox "$#"
/folder/tmp/pdf-writer-alert/AD_User_Login IN_CREATE pdf-writer-alert "$#"

My user is allow in /etc/incron.allow All folder right look's good, it's working when I manually restarting incron.

After a reboot, I have this message in syslog:

incrond[961]: table for invalid user AD_User_Login found (ignored)

If I restart again incron everything work's fine

Few things, my users are on a Active Directory, so I use sss for login. My users's home are encrypted too before login.

Any idea?

Thank for help

Encountering similar issues myself (albeit on centos) - ie using incron to process files with sss for accounts and seeing an invalid user reported, an error which goes away after incron is restarted.

If you're still encountering this issue, the problem appears to be due to there being no relationship visible between sssd and incrond in the systemd startup config which is probably resulting in incrond starting up before sssd, and thus the user account in question not yet being visible.

On a centos box the relevant files were /usr/lib/systemd/system/incrond.service and /usr/lib/systemd/system/sssd.service (look in the tree rooted at /etc/systemd for the Ubuntu equivalents). I'd suggest adding a After=sssd.service line to the incrond service file (or appending the additional service to an existing After line), running a systemctl daemon-reload and rebooting.

You may also need to make some related changes to ensure that your encrypted directories are accessible to the system when the incron service is launched (though if it requires the user to have logged in prior to the service's launch in order to decrypt them this may not be possible).

Thanks for your answer, it's help me. After a wild I work on it again. So I'm done it by

systemctl edit incron.service

and put:

[Unit]
After=sssd.service

Then restarting systemd

systemctl daemon-reload

Regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM