[GRLUG] cron job an password

Greg Folkert greg at gregfolkert.net
Tue Jun 11 15:03:29 EDT 2013


On Tue, 2013-06-11 at 09:44 -0400, Eric Beversluis wrote:
> How can I set a cron job to do mysqldump without hardcoding the mysql
> root password into the cron command? (It looks like anyone can read the
> various cron files.)

What looks like anyone can read the various cron files?

If it happens, your installation/distro is broken and seriously needs to
be fixed. If *YOU* don;t understand permissions, please investigate
them.

As far as I know... crontabs for individuals are not readable by even
them without using crontab.

$ cat /var/spool/cron/greg
cat: /var/spool/cron/greg: Permission denied
$ crontab -e      #(allows me to edit my crontab and it is valid)
$ ls -l /var/spool/cron/greg
ls: /var/spool/cron/greg: Permission denied
$

Now if you are talking for the files in /etc/cron.(d|daily|weekly|etc),
then that is not a problem and these are typically used for
non-passworded systems daemon maintenance like Log rotation or updating
the apropos DB (aka whatis)

Please investigate permissions before you make more problems for
yourself. (the 10 characters at the beginning of the long listing)

-- 
greg at gregfolkert.net
PGP key 1024D/B524687C 2003-08-05
Fingerprint: E1D3 E3D7 5850 957E FED0 2B3A ED66 6971 B524 687C
"Our happiness depends on wisdom all the way."
    -- Sophocles
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20130611/d0e8ff76/attachment.pgp>


More information about the grlug mailing list