Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cron job for every user
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
KintaroBC
n00b
n00b


Joined: 15 Feb 2014
Posts: 52
Location: Australia

PostPosted: Tue Mar 20, 2018 9:26 pm    Post subject: Cron job for every user Reply with quote

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
View user's profile Send private message
mike155
Guru
Guru


Joined: 17 Sep 2010
Posts: 548
Location: Frankfurt, Germany

PostPosted: Tue Mar 20, 2018 9:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12731

PostPosted: Wed Mar 21, 2018 1:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum