LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-12-2004, 03:34 AM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 455

Rep: Reputation: 30
root crontab


I am trying to update root's crontab by running crontab -e under roots login.

However, I find that after saving :x and then listing the crontab, it is not updated.

All is well for other users crontabs.

Any ideas?

Slack9.1
 
Old 03-30-2004, 12:37 AM   #2
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 455

Original Poster
Rep: Reputation: 30
Come on, someone must know something about this...

Please....
 
Old 04-12-2004, 07:01 PM   #3
atlee
LQ Newbie
 
Registered: Apr 2004
Posts: 1

Rep: Reputation: 0
I can't help much with a solution, but I'm having the same problem. Crontab -e creates a temp file named crontab.12345 (or whatever) under /var/spool/cron, and if you save the file in your text editor but do not close it, you can see the changes if you cat out the file. However, when you exit the text editor, this temp file isn't copied into /var/spool/cron/crontabs/root. It's not a permissions problem, since chmod 777 doesn't seem to resolve it. I suspect something like a lockfile, but I don't know enough about the nuts and bolts of dillon-cron to know where one might be. /var/log/cron is empty, and no helpful error messages are to be found in any of the other usual logfiles.

We first experienced this on a Slackware 8.0 box, and I've tried various things to resolve it -- restarting crond, reinstalling crontab from package, reinstalling crontab from source, deleting and recreating the /var/spool/cron directory. I can reproduce it on two separate Slack 9.1 installs, so it's not the result of some funkiness on one particular box. Like plisken says, it's not a problem for regular users, only for root.

I realize I can just manually edit /var/spool/cron/crontabs/root, but I would like to know what's going on here.
 
Old 04-12-2004, 07:04 PM   #4
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1/13.37/14 RedHat 6.2/7/EL6.5 SuSE 8.2/11.1
Posts: 455

Original Poster
Rep: Reputation: 30
I've also noticed that as root, if you were to make changes to another users crontab by doing the following:

crontab -u otheruser -e

It does not update either, it has to be done by the user itself.

I did think it was something on my setup, but it is good to see that others have the same problem, well not good, but you know what I mean
 
Old 04-30-2004, 01:58 AM   #5
tonjackc
LQ Newbie
 
Registered: Apr 2004
Location: Strasbourg-France
Distribution: RH[6,7,9].[0-9]
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by atlee
I can't help much with a solution, but I'm having the same problem. Crontab -e creates a temp file named crontab.12345 (or whatever) under /var/spool/cron, and if you save the file in your text editor but do not close it, you can see the changes if you cat out the file. However, when you exit the text editor, this temp file isn't copied into /var/spool/cron/crontabs/root. It's not a permissions problem, since chmod 777 doesn't seem to resolve it. I suspect something like a lockfile, but I don't know enough about the nuts and bolts of dillon-cron to know where one might be. /var/log/cron is empty, and no helpful error messages are to be found in any of the other usual logfiles.

We first experienced this on a Slackware 8.0 box, and I've tried various things to resolve it -- restarting crond, reinstalling crontab from package, reinstalling crontab from source, deleting and recreating the /var/spool/cron directory. I can reproduce it on two separate Slack 9.1 installs, so it's not the result of some funkiness on one particular box. Like plisken says, it's not a problem for regular users, only for root.

I realize I can just manually edit /var/spool/cron/crontabs/root, but I would like to know what's going on here.
Today, I was expecienced this crontab strange behaviour, crontab -e didn't update my cron job list. What is really a concern is it happened some days after the april fool day... It's the very first time (after more than a decade of system administration) I'm faced to such a basic refusal. Is it a vi flaw ? (surely not), a hacked cron ? (I should consider this as a plausible and definetely possible reason). Would like to know much more about all this. Thanks for reporting your fix.
 
Old 04-30-2004, 05:30 AM   #6
Marsanghas
Member
 
Registered: Sep 2003
Location: Spijkenisse, Netherlands
Posts: 116

Rep: Reputation: 15
Quote:
Originally posted by tonjackc
What is really a concern is it happened some days after the april fool day...
Actually the real concern is that you make a link with something not working as you expect and april fools... ;-)

Anyway... it does sound like a locking thing. Did you try to update it when crond isn't running?
 
Old 05-02-2004, 02:59 AM   #7
anonymous555
LQ Newbie
 
Registered: Mar 2004
Posts: 12

Rep: Reputation: 0
Solution

I found that i get this because i linked /usr/bin/vi to vim.

export VISUAL=/usr/bin/elvis
crontab -e

^ this should work

coderock
 
Old 05-02-2004, 11:31 AM   #8
tonjackc
LQ Newbie
 
Registered: Apr 2004
Location: Strasbourg-France
Distribution: RH[6,7,9].[0-9]
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by MarsDude
Actually the real concern is that you make a link with something not working as you expect and april fools... ;-)

Anyway... it does sound like a locking thing. Did you try to update it when crond isn't running?
OK, I was kidding, there's no kind of link nor correlation with april fools . I shut down crond then I reinstalled my rpm. Didn't change anything at all. Then I compilled source....same result ( I didn't expect anything else frankly ). Permissions on implied files are correct, I test this on a daily basis for all the system. Well, the one and only "fix" is atee's one (thread just above mine).
You should ask me about my RedHat box environment. It acts as a java application server, as apache server and as an automated GIS image processor. I never run into any kind of conflicts between them.
Thanks for your suggestion.
 
Old 05-02-2004, 11:41 AM   #9
tonjackc
LQ Newbie
 
Registered: Apr 2004
Location: Strasbourg-France
Distribution: RH[6,7,9].[0-9]
Posts: 3

Rep: Reputation: 0
Quote:
Originally posted by tonjackc
OK, I was kidding, there's no kind of link nor correlation with april fools . I shut down crond then I reinstalled my rpm. Didn't change anything at all. Then I compilled source....same result ( I didn't expect anything else frankly ). Permissions on implied files are correct, I test this on a daily basis for all the system. Well, the one and only "fix" is atee's one (thread just above mine).
You should ask me about my RedHat box environment. It acts as a java application server, as apache server and as an automated GIS image processor. I never run into any kind of conflicts between them.
Thanks for your suggestion.
A precision: crond daemon was running when I was editing crontab ( my fetching automat does need it ).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab as root nutthick Linux - Newbie 2 03-03-2005 02:13 AM
cannot use crontab as root???? rnj Linux - Software 2 10-24-2004 10:24 AM
Crontab "root user" problems... Clubber Lang Linux - General 3 09-30-2004 09:29 AM
How to restore original root crontab vrillusions Slackware 1 04-21-2004 09:54 PM
problems with crontab for root reqvidd Linux - Newbie 2 11-10-2003 07:57 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration