SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trying to add this to my root's cron but it does not work.
All i get is this bash: syntax error near unexpected token `('
Any help would be great
If you want to get the output of chkrootkit once a day per email at 3 am you can put the following line in root's cron file (the location depends on your distribution; under Debian it is under /var/spool/cron/crontabs/root; you might also find it under /var/spool/cron/tabs/root or something similar):
First of all, I don't think you should edit the file straight away; use crontab -e instead, as root. Second, why are there "(" and ")"? I suppose you don't need them. To me it looks like that should work without them..
0 3 * * * cd /usr/local/chkrootkit; ./chkrootkit 2>&1 | mail -s "chkrootkit output" me@myself.tld
That does the job I'm quite sure. I have no clue where you got the "()" around it..
EDIT: unless the writer of the "help" text wanted you to notice that the whole thing inside "(" and ")" was the cron job to be run, so you wouldn't be confused about the semicolons or anything..well sounds stupid but that's all I can think of.
Just run crontab -e as root and write the above (quoted) line there, save and that's it. If you use VI as you probably do, then after running "crontab -e" you get the file open, press down-arrow until you're at the last line, then press shift-a to go to Append mode, press ENTER to start a new line and write the above (quoted) line there. If the file is empty, just press shift-a and start typing. When you've written it, press ESC button once (or twice if you're unsure, you should hear a beep) and type :wq and press ENTER to save and exit. You're done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.