View previous topic :: View next topic |
Author |
Message |
KintaroBC n00b

Joined: 15 Feb 2014 Posts: 63 Location: Australia
|
Posted: Tue Mar 20, 2018 9:26 pm Post subject: Cron job for every user |
|
|
I want to create a cronjob for every user which runs as that user. Also, I want to be created for new users as well. I'm using cronie, I am wondering what the best way to do this would be. I need it because SELinux prevents root reading users files, and I want those users to have backups. |
|
Back to top |
|
 |
mike155 Advocate

Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Tue Mar 20, 2018 9:41 pm Post subject: |
|
|
Why don't you write single a cron job which runs as root, loops over all users and performs "su - $user -c <backup-command>" for each user? |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23180
|
Posted: Wed Mar 21, 2018 1:13 am Post subject: |
|
|
Is root incapable of reading user files entirely or is it that the specific SELinux context in which you tested is unable to read user files, but a different context would be permitted to read those files? In what context did you try to read user files? |
|
Back to top |
|
 |
|