SUMMARY: sudo from crontab

From: Seth Rothenberg (SROTHENB_at_montefiore.org)
Date: 09/29/04

  • Next message: fabio: "SUMMARY: csh and arrow keys on Solaris 9"
    Date: Wed, 29 Sep 2004 14:11:35 -0400
    To: <sunmanagers@sunmanagers.org>
    
    

    Thanks for all the replies.

    I asked about having a user run a script using sudo from his crontab.
    The user CAN run the command via sudo from the command prompt,
    but cron's environment causes sudo to prompt for a password.

    Many people wrote to confirm that I was using a proper sudoers file,
    even suggested I read the Man page.

    No-one confirmed that Cron can run something under sudo when sudo.
    A few people suggested to give up and run it as root,
    or maybe that it should have been a root task in the first place.

    I just wanted one script to do the task and update a database,
    don't want root updating the database if I can help it. HIPAA
    auditors may wonder...

    The summary is, It seems that sudo is not compatible with cron in
    solaris 2.6.
    (that's not to say you can't use sudo to run crontab - that you can do
    :-).
    I don't know about other platforms, but google says no-one else knows
    either.

    Thanks again
    _______________________________________________
    sunmanagers mailing list
    sunmanagers@sunmanagers.org
    http://www.sunmanagers.org/mailman/listinfo/sunmanagers


  • Next message: fabio: "SUMMARY: csh and arrow keys on Solaris 9"

    Relevant Pages

    • Re: system crontab
      ... I would like to daily run a certain script that cleans exim's queue from frozen messages: ... I have created a file called rm_frozen_msg.sh, gave it appropriate permissions and then installed it in my user crontab. ... Because it did not work I read the man and found out that I cannot run scripts as another (root) user. ... I deleted sudo from the file. ...
      (freebsd-questions)
    • Re: Gruppo di =?ISO-8859-1?Q?continuit=E0eutenteRoot?=
      ... No, non va modificato lo script, si tratta di scrivere sudo davanti allo ... leggendo poi tra le varie FAQ e sul forum avevo trovato una procedura ... Non funziona male ma e proprietario, con tutti i difetti che questo ...
      (it.comp.macintosh)
    • Re: How to suspend x86 via apm as non-root user?
      ... Use sudo, combined with a script that runs apm -s. ... USERS ALL = NOPASSWD: SHUTDOWN, NTPDATE ...
      (Debian-User)
    • Re: Card Reader
      ... Running your script ... instead of sudo is worthless because your script *can't do ... And of course it doesn't ask for a root password, ... >> That's just more bullshit Bryan, and you might as well leave ...
      (rec.photo.digital)
    • Re: shell script automatically logging in...
      ... Doesn't sudo require interaction from the user. ... allowed to set scheduling in when logged in as non-root user. ... The idea that I had to overcome this was to write a pre-build script ...
      (comp.os.linux.development.system)