204 reputation
16
bio website pbrs.blogspot.com
location San Antonio, TX
age 50
visits member for 3 years, 9 months
seen Jul 2 at 16:27

I've been working with UNIX, GNU, and Linux for over 25 years. I've done significant programming in over 40 programming and scripting languages, including Smalltalk, Objective-C, C, Csh, bash, perl, awk, m4, and lots more. I've worked as a consultant, systems administrator, customer support representative, project manager, trainer, founder/CTO, and lots more.


For fun I play guitar (acoustic and electric), build LEGO robots, tweak http://reiber.org and make random contributions all over the internet - see: http://bit.ly/reiber which just scratches the surface.


Nov
25
awarded  Yearling
Apr
18
revised How do I get permissions to edit system configuration files?
cleared reformatted answer of misleading identification of the answers author
Apr
11
answered How do I get permissions to edit system configuration files?
Apr
11
comment Reasons why crontab does not work
@geirha we could go back and forth all year on this, but I won't - this will be my final update on this matter. I agree you can't guard against sysadmins making silly mistakes. Like, setting a PATH instead of using full pathnames in their cron specifications. /opt/someApp/bin is neither a "system file" nor a "system directory" - it's a 3rd party app directory being put in the FRONT of a PATH for crontab in your example. If that's ROOTs crontab, that's a REALLY BAD IDEA. Period. It's really quite simple - the best practice is using complete pathnames, not counting on a PATH setting.
Apr
9
comment Reasons why crontab does not work
@geirha another sysadmin could unwittingly place new exes in the directories - possibly newer versions of language interpreters for example, which might not work with the older code being called by cron. ALSO - in your example a non-standard dir is added to the FRONT of the path - /opt/someApp/bin - goodness knows who the owner/group are on that, and what the perms are. Easy enough for there to be an unintentional "hole" an attacker could leverage. I stick to my original statement - counting on the PATH is a bad idea, use fully qualified paths to the executables.
Apr
8
comment Reasons why crontab does not work
Counting on the PATH is a bad idea. "because an exe may be elsewhere on some other computer" does NOT trump "I want my cron job to run exactly the exe I specify, and not some other exe someone may someday put in a directory listed earlier in the PATH than the one my original exe is in" - - think about it - someone could put a new (tainted) version of "bash" or "mail" or any other program you're calling without a full path into /opt/someApp/bin ...and magically, they OWN your system when some ROOT cronjob runs their tainted exe instead of the one it should be running.
Apr
8
awarded  Commentator
Apr
8
comment Reasons why crontab does not work
Bzzt. you do NOT need to define the PATH - using absolute paths is the best practice here. "because an executable may be elsewhere on some other computer" doesn't trump "I want it to run exactly this program and not some other one someone put in the path in front of my original program"
Apr
8
comment Reasons why crontab does not work
Yes, after changing the timezone on a system, one must either restart every service that cares about what time it is, or reboot. I prefer the reboot, to be sure I've caught everything.
Apr
8
comment Reasons why crontab does not work
Reviewing cron's error log is the most common way. IIRC 'crontab -e' does a syntax parse after you've edited the file as well - but that might not be universal.
Apr
8
awarded  Editor
Apr
8
awarded  Critic
Apr
8
comment Reasons why crontab does not work
It's a feature not a bug - it keeps things like myscript.backup or myscript.original or myscript.rpm-new from running right beside myscript.
Apr
8
comment Reasons why crontab does not work
I've NEVER seen this case in production. Doesn't mean it hasn't happened - just that I've not seen it in the 30 years I've been using UNIX and Linux. Cron is insanely robust.
Apr
8
revised Reasons why crontab does not work
added 445 characters in body
Jan
27
answered Reasons why crontab does not work
Jan
27
answered Copy function corrupt
Oct
14
awarded  Supporter
Oct
14
comment Linux diff command
way cool. thanks for sharing!
Oct
14
comment How to get a bug noticed
Lost in the volume of an awesome answer is: "If nobody around seems to be able to help, try another time of the day" ...which I can't stress strongly enough is a great way to get traction on issues.