how to write a cronjob for all users? - cron

I am trying to install ClamAV, and want to make a cronjob, which does a daily scan, but FOR all users, not a specific one or specific group! for all users of the computer!
How can i do that?
Thanks

Related

how to not allow other user to copy my script in remote server

experts, i am using a Linux server where the same username and password are used by other persons to login and perform their work. Some time they delete and misplace my scripts from that server.So in order to overcome this problem i want to know are there any procedure so that other users of same id cannot see and access my scripts.I hope experts will help me in this regard.
i am using `ssh` command to login
i am also trying to hide the script but not successfully done it.
Unix systems are not designed to protect against unwanted or malicious accesses from the same user. If all of the people on the machine are using the same user account, then to a Linux or Unix system, they are the same user, and each and every human has the same privileges to act on that file.
If you want to have different access control permissions for different humans, then they need to have different accounts. This is the basis of security permissions for Unix systems. This is also why many daemons run as their own unprivileged user: so that if one process gets compromised, it is unable to negatively affect other things on the system.

Google Docs Time-driven file permission change

I have a Google Doc that I want to change the user permissions for, based on the time of day. To be precise, I need it to be restricted from 9am - 12pm and 1pm to 6pm. At all other times I want anyone with the link to be able to comment on it.
Up until now I have been manually doing this every day, but I want it to be automatic. Is this possible?
You can create a script using Apps Script, and use time-driven triggers to run functions from the script at specific times or time intervals.
You can change a file's sharing permissions, commenters, editors, etc. with the class File from the Drive service to modify the Doc's commenters.

Cron to read from multiple crontab files for each system

I have a large landscape of servers. There are logical groupings for some servers (clusters). I'd find a way to run crontabs on specific clusters. Specifically, I'd like to have a centralized location were I can edit their crontabs at the same time.
Currently, what I'm doing is accessing each server and editing their crontabs the manual way.
Thanks
Maybe you should consider a tool like Ansible which would allow you to manage the cron entries or cron files locally, and distribute them to your servers.
Ansible is quite easy to learn and all you need is Ansible, Python and a working ssh connection.

Linux User Group Assignment

So I'm trying to create a way for users in Linux to create groups, then add other users to them. As far as I can tell, only root can modify groups. The reason is, I want users to be able to create a group, then chgrp/chown the files they own and give read access to specified groups of users.
My idea was to make a utility that encapsulates a "sudo groupadd " call. This utility would have access to some root-accessible file that keeps track of group ownership. Is it possible to do this without needing the user to enter root password?
I know that this is probably very exploitable, but please note that this is not going into production of any sort.
Please let me know how I can accomplish my approach (namely letting non-sudo run sudo program) or if you have any alternative suggestions.

Will cron run for different user or account?

I'm new to cron. Someone just introduced it to me. Will cron run for different users?
I mean, I want to run a certain script (which update the database) every 5 minutes if the user is online. What if I have a lot of users who are online? Can cron handle a task like this?
Use crontab -e to edit the current user's crontab. However the script will have to check if the user is online or not.
Cron won't do that automatically.

Resources