Visit Our UNIX and Linux User Community

Cron security issues?

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Cron security issues?
# 1  
Old 05-01-2012
Cron security issues?

Does the use of cron (HP-UX 11) present a security risk IF it is only given to accounts which have shell access anyway.

If it does present a risk, what is the risk?

Can a script (or command) run via cron; run anything, write anywhere or read anywhere that the same user can not do outside of cron?
# 2  
Old 05-02-2012
The risk is only for restricted or chrooted accounts being able to access files the account could never access before.

The risk is the same for a user with shell access, and the same user with access to commands/files via crontab. Ditto at and batch.

For any valid shell user, accessing crontab has a greater chance of screwing things up, because the environment in cron jobs is not the same as the interactive environment. This leads to errors and bad code trashing things.

So if security is set correctly, inept crontab users mostly trash their own stuff.

So, how do you want to define security?
# 3  
Old 05-11-2012
We never allow users permissions for cron. This is a quality control and scheduling decision and not a security issue as such. We use "su" from the root cron to execute scripts in the name of the user and have automated scripts to check the cron log and the root mail file for errors.

There was a thread on recently where a badly-written user cron executed a command which hung. After a while the cron queue limit was exceeded and the system crons stopped running.

I had a trusted contractor who had access to run "at" jobs but not to run "cron" jobs. After he left a process stopped working after a reboot. It turned out (after a lot of detective work) that he was using self-spawning "at" jobs to stop/start the background processes. Ever since then all automated start/stop scripts have been tested from cron at the same time that the code is tested.

Previous Thread | Next Thread
Test Your Knowledge in Computers #798
Difficulty: Medium
To convert from a base-10 integer to its base-2 (binary) equivalent, the number is divided by two and the remainder is the least-significant bit.
True or False?

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Db2 command issues with cron

Hi, I have a very simple script that queries from a DB2 table. The script has 3 parts - (i) Sets the db2profile (ii) connects to db2 using credentials (iii) executes the query.This script works fine if i run it manually from the command prompt. However when scheduled in crontab, it proceeds... (2 Replies)
Discussion started by: VeePee
2 Replies

2. AIX

Cron scripts security

Hello everyone, I have an AIX 6.1 machine and i experienced a problem with my cron scripts. It appears that somebody renamed a cron script so crontab could not execute it. Is there a way to put some security on cron scripts so nobody else except root can rename or delete a cron script? Or they... (6 Replies)
Discussion started by: omonoiatis9
6 Replies

3. Shell Programming and Scripting

Bash/cron issues

Hi all, I am trying to run a cronjob to push my files to my git repo once a week and output a prompt to a logfile, my script works fine if I invoke it manually but my cronjob wont run for some reason, I have sourced the file, and restarted my Mac to no avail, right now I believe I have the cronjob... (8 Replies)
Discussion started by: gmenfan83
8 Replies

4. Homework & Coursework Questions

Security issues with universal access of file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: If you look at the permissions associated with a symbolic link, it has universal access. Does this lead to... (0 Replies)
Discussion started by: linux17
0 Replies

5. Solaris

cron / crontab issues - solaris 10

I am having some issues with my cronjobs not running in solaris 10. Cron is running: ~> ps -ef | grep cron root 202 1 0 Jul 18 ? 0:01 /usr/sbin/cron bender 1646 1562 0 01:57:49 syscon 0:00 grep cron crontab -l lists the cronjob and I *think* its in the... (8 Replies)
Discussion started by: ippy98
8 Replies

6. Shell Programming and Scripting

FTP Cron issues

I am on AS3 Update 4 Linux and am having an issue with an automated ftp script, I tried using the fd/sub proc method and that did not seem to work either. I normally use the following method to perform my ftp's but for some reason it works if I launch the script at the command line but in Cron it... (4 Replies)
Discussion started by: bryanthomas
4 Replies

7. Cybersecurity

NFS security issues with lockd and statd

We are trying to implement a NAS solution with UNIX servers and multiple networks, and I've heard that NFS has security issues with lockd and statd. The security issue as it was explained to me is that these services are subject to vulnerabilities/exploits, and that users who connect to Unix... (1 Reply)
Discussion started by: onceagain
1 Replies

Featured Tech Videos