LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   How to access other users crontab as a normal user (https://www.linuxquestions.org/questions/linux-security-4/how-to-access-other-users-crontab-as-a-normal-user-899304/)

jeesun 08-25-2011 12:19 AM

How to access other users crontab as a normal user
 
HI

I have a requirement. As a root i can view other users crontab entries using the command "crontab -u <user> -l". But I can't get access to other user's crontab using those command. It returns me the error "crontab error must be privileged to use -u". Which i think need some configuration or some permisions. But can't figure out where to.

Please help me to find this?

lystor 08-25-2011 01:17 AM

Quote:

Originally Posted by jeesun (Post 4452749)
HI
It returns me the error "crontab error must be privileged to use -u". Which i think need some configuration or some permisions. But can't figure out where to.
Please help me to find this?

Hi
You can use sudo to give certain users the ability to run some commands as root.

kostya 08-25-2011 01:26 AM

Well unless I'm terribly mistaken, you can't view other users' stuff unless you have root password. File permissions are the core of Unix and part and parcel of Unix security concept, and a rather effective one at that.
According to which system, a process ID accessing files must either be the owner of the files in question or "be privileged". Why, even in MS Windows you can't access other user's stuff as a regular user. So your "requirement" sounds rather strange to me (sure I can be mistaken).

man crontab:
Quote:

In this version of cron , /etc/crontab must not be writable by any user
other than root. No crontab files may be links, or linked to by any
other file. No crontab files may be executable, or be writable by any
user other than their owner.
EDITBut hey, is it not possible to attain to your goals without breaking the system?
While I was yet typing, the above comment appeared, which answers your question :). Which doesn't make wrong what I've said above.


All times are GMT -5. The time now is 02:29 PM.