Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
1) I'm not sure why the cron job isn't working. Are you sure cron is running? Is there anything in the logs that might shed some light?
2)Why don't your create a new mysql user specifically for this task. You could create one that doesn't have a password and then give it EXTREMELY limited privileges. Or keep the password for that user, but still severely restrict privileges. You're shooting to have ONLY those privileges needed to run mysqldump. That way if someone does get their hands on that username (and password if you choose), they wouldn't be able to do anything.
I don't think there is a way to give access to just mysqldump since it is a program that uses database functions, it isn't a database function itself. From what I can tell (and believe me I'm no expert), you probably need SELECT and FILE and maybe SHOW DATABASES and LOCK TABLES. You might try with just a minimal set like these (or heck, even see if it works with just USAGE) and add privileges until it works.
Oddly, if you do a little searching on mysqldump, it looks as if most people run it from their admin account. That suggests either they aren't using a cron job to do their backup or they haven't thought through the security implications.
You might also limit these privileges to username@localhost. If you restrict the mysqldump user to localhost then if someone DOES learn the username, they would also have to have an account on the specific box to make use of it.
I'll check out the privileges stuff. Also, I already have my box locked down as far as hosts are concerned (localhost only), so I'm not too worried about that. I'll probably do exactly that, though - just keep adding on one logical privilege at a time until it works.