Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
I need some help with doing backups on a Ubuntu 8.04 LTS server. I have created a cron job that does not want to run. What am I doing wrong? Something simple am sure.
The crontab looks like this: 20 11 * * 4 tar -cWPpf /dev/st0 /home/public $
I know the command works cause I can run it from the command line OK but, I do have to use root. I tried using the sudo command in the crontab but, that did not work either.
Any help or suggestions would be appreciated.
Thanks
Wayne
Cron jobs do not run the login scripts so your usual shell environment is not available. You may have to use the full path to the commands that you want to run such as using /bin/tar instead of just tar.
D'oh I figured it out.
1. I had the wrong day code Thursday and should have been Wednesday &
2. more importantly I needed to create the crontab with root (sudo) not a normal user.
Another question for grepmasterd. This server is just for file servering and not a gateway. Should I still have an email service going? Maybe just for error reports & admin reasons?
most distros will at least have mail configured for local delivery (ie, not over the network). Just use the 'mail' command line utility to access your local messages. see 'man mail' for details.
To test sending a message (assuming your login is 'wayne')
Code:
mail -s test -c root wayne
type some message using stdin here....
to end the message type Ctrl-D, or if your a SMTP traditionalist
just type a period as the first and only character in the line
like this:
.
The message should be sent to /var/mail/wayne (or wherever your system's mailboxes are). Then use 'mail' with no options to read your inbox.
no, don't bother with postfix or sendmail unless you want to send mail over the network. especially since there are plenty of security issues associated with email servers.
just use mailx. from the end of the mailx man page:
"Usually, Mail and mailx are just links to mail, which can be confusing."
Edit: oh and by the way, 'pidof sendmail' is the way to see if an instance of sendmail is running. don't bother piping ps output to grep.
Last edited by grepmasterd; 04-16-2009 at 10:46 PM.
Shouldn't really be any security problem with Postfix - not open relay out of the box, and he doesn't even need to allow port 25 in from outside for outgoing only.
Last edited by billymayday; 04-16-2009 at 11:50 PM.
Reason: Typo
ok, my bad. you need an mta for local delivery too (mailx does not include that). but I think exim is the default mta for debian woody. whatever is the default mta should be handling local delivery.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.