- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Can normal users edit Crontab
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 11:51 AM
тАО12-09-2004 11:51 AM
Can normal users edit Crontab
A query, except super users, can normal users edit the crontab. Can I assign rights to normal users to perform that. And if yes, how do I do that?
THank u!!
regards..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 12:12 PM
тАО12-09-2004 12:12 PM
Re: Can normal users edit Crontab
If you are talking about them editing root's crontab, then no they can't, and I wouldn't want them to (would you want a user to randomly put something like 'shutdown -hy 0' in root's crontab? I think NOT!).
There are ways to allow that via things like sudo though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 12:19 PM
тАО12-09-2004 12:19 PM
Re: Can normal users edit Crontab
This would be a terrible idea and security threat. The kind of idea that would cause you to flunk a security audit. Never, never never give regular users root access accept under controlled circumstances.
For example the passwd command is a SUID command because the user needs to update a root only file for writes, /etc/passwd
To give users access to root cron would be like placing a "have an IT disaster here please" sign on your forehead.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 01:45 PM
тАО12-09-2004 01:45 PM
Re: Can normal users edit Crontab
I think you can edit the cron.allow and cron.deny.
If only the cron.deny file exists, any user whose name does not appear in the file can use crontab command.
A user cannot use the crontab command if one of the following is true
1) The cron.allow file and cron.deny file does not exist(allows root user only)
2) The cron.allow file exists but the user's login name not listed in cron.allow
3) The cron.deny file exists and the user login name is listed on it
Rashid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 04:04 PM
тАО12-09-2004 04:04 PM
Re: Can normal users edit Crontab
Then, they execute:
crontab -e
man cron for more info.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 04:48 PM
тАО12-09-2004 04:48 PM
Re: Can normal users edit Crontab
Thanks for the valuable inputs.
My system does not have cron.deny file, I have added my username in the cron.allow file but I was not able to write to crontab. Is there any explanation for this?
Thanks and regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 05:30 PM
тАО12-09-2004 05:30 PM
Re: Can normal users edit Crontab
When saving cron.allow try to use:"wq!" instead "wq".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 06:24 PM
тАО12-09-2004 06:24 PM
Re: Can normal users edit Crontab
crontab -e
for creating cron entries.
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 07:20 PM
тАО12-09-2004 07:20 PM
Re: Can normal users edit Crontab
P.S.
Send exact error msg pls ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 08:49 PM
тАО12-09-2004 08:49 PM
Re: Can normal users edit Crontab
also check if the cron daemon is running!
ps -ef|grep cron
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-09-2004 08:59 PM
тАО12-09-2004 08:59 PM
Re: Can normal users edit Crontab
# ll /var/spool/cron/crontabs/root
-r-------- 1 root sys 782 Jan 20 2004 /var/spool/cron/cronta
bs/root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2004 02:09 AM
тАО12-10-2004 02:09 AM
Re: Can normal users edit Crontab
crontab -e username
Does that work?
Save it, is it in:
/var/spool/cron/crontabs
cron.allow should be in:
/usr/lib/cron/
man crontab for more info
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-10-2004 02:20 AM
тАО12-10-2004 02:20 AM
Re: Can normal users edit Crontab
2) How were you editing it?
If you did something like 'vi /var/spool/cron/crontabs/root' as a normal user and tried to modify and save it, then it won't work. You'd have to modify the permissions of the file (which I would NOT recommend) to allow that.
If you do a 'crontab -e' as a normal user then you will edit YOUR OWN crontab file and NOT anyone else's.
What EXACTLY are you trying to accomplish? Whose crontab file do you want normal users to edit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2004 01:55 PM
тАО12-13-2004 01:55 PM
Re: Can normal users edit Crontab
Actually wat I am trying to do is to add an cron job to my system. I have added my username in the cron.allow, and there is no cron.deny file in my system.
However, when I try to create
> crontab -e
and then tried to saved the file with "wq!"
it prompted me this
"Cant create your crontab file in crontab directory"
May I know why this is happening?
thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-13-2004 11:54 PM
тАО12-13-2004 11:54 PM
Re: Can normal users edit Crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-14-2004 01:42 AM
тАО12-14-2004 01:42 AM
Re: Can normal users edit Crontab
crontab -e yourid
What is permission of
/usr/bin/crontab
Should be:
-r-sr-xr-x 1 root bin 24576 Nov 14 2000 /usr/bin/crontab
Rgds...Geoff