On Wednesday 18 August 2010 23:56:36 Brian K. White wrote:
On 8/18/2010 4:51 AM, Bob Williams wrote:
On Tuesday 17 Aug 2010 23:59:21 dwgallien wrote:
On Tuesday 17 Aug 2010 18:32:26 dwgallien wrote:
Hi,
What is the correct way to edit the system crontab file? I know I've done it in the past, because I have /etc/crontab which contains all my backup routines. Is it permissible to edit it with any editor (eg. vim, kate), as root?
I've tried issuing
~ # crontab -e
but that just creates a new, blank file.
I think I'm getting too old for this :(
Bob
IIRC (been a very long time) it can be edited manually. However, since you are using KDE, take a look at Personal Settings/Advanced/Task Schedule; that will create the crontab for you.
That only lets me edit my personal crontab. I want to edit the system crontab, as I have some tasks that have to run as root. I'll try editing it manually and see what happens :)
Thanks.
Bob
Check that again. There should be a radio button for "system cron". Using this option requires running as root.
And that's what I don't want to do - log into a graphical environment as root just to be able to edit a small text file. I'm looking for a CLI solution, and Brian's replies have given me that.
Bob
To be fair, any menu item that requires root should, and probably already does, use gksudo or similar rather than being directly called like other harmless apps.
No one ever advises actually logging in to a full desktop as root any more. Those apps that need root will ask you for the root password right when you run that specific app and it will only apply to that app.
You should be able to use the gui just fine, while logged in as a normal user. Even if a given util does not currently use a sudo-alike, you can just edit that menu entry to do so.
Personally I'd rather just edit the file directly as you are, but there IS one reason to use a front-end, be it gui or curses or web, which is you can at least count on the front end to always write out a syntactically valid config file. It may or may not do what you want, but it won't make syntax errors that break the file like missing quotes or wrong number of fields in a line etc.. It's safer for most users.
On my system, the radio button button referred to by dwgallien only allows me to view the system cron, there is no option to edit it, hence my remark that I would need to login to the gui as root. I guess I could find the Stem Settings entry in the kmenu editor and change that behaviour. I hadn't thought of that... Except there's no submenu to edit :( Bob -- Registered Linux User #463880 FSFE Member #1300 GPG-FP: A6C1 457C 6DBA B13E 5524 F703 D12A FB79 926B 994E openSUSE 11.3, Kernel 2.6.34.12-desktop, KDE 4.5.0 Intel Core2 Quad Q9400 2.66GHz, 8GB DDR RAM, nVidia GeForce 9600GT -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org