[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: crontab command and permissions problem



When the date was Tuesday 10 February 2009, Jordi Moles Blanco wrote:

> I'm having a problem trying to execute the "crontab" command from a perl
> script.
>
> When i call this command from the SNMP system, i get this:
>
> "must be privileged to use -u"
>
> the procedure is...
>
> 1. i create a cron file for a particular user in
> /var/spool/cron/crontabs/username
> 2. i run "crontab -u username /var/spool/cron/crontabs/username"

You are not running the script as root. You may want to consider setuiding 
your script (chmod +s) and install perl-suid.

-- 
 Michael Iatrou (txnb)


Reply to: