Results 1 to 8 of 8

Thread: Invoking a script from WEBAPP with superuser permissions

Threaded View

  1. #1
    Join Date
    Nov 2011
    Beans
    3

    Post Invoking a script from WEBAPP with superuser permissions

    Hi

    I am trying to run a script from a webapp on tomcat6. The problem is that I need superuser permissions for tomcat6 user to run the script.

    I have not changed my sudoers file, I just created a new one at /etc/sudoers.d/ that looks like this:

    Defaults env_keep += "JAVA_HOME"

    # Host alias specification

    # User alias specification

    # Cmnd alias specification
    Cmnd_Alias TOMCAT_ALLOWED = /opt/domotics/databasebackup.sh, /usr/bin/innobackupex

    # User privilege specification
    tomcat6 ALL=(ALL) NOPASSWD: TOMCAT_ALLOWED

    The problem is that I keep getting this error:
    "sudo no tty present and no askpass program specified"

    I know why I am getting this error, I just do not know how to solve it :S

    I have already used "Defaults visiblepw" but this option only makes my webapp act like an endless loop (prompts for a password and I do not want that behavior).

    Am I missing something? (information in http://ubuntuforums.org/archive/index.php/t-639803.html is not solving my problem either)

    PS: Release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=11.10
    DISTRIB_CODENAME=oneiric
    DISTRIB_DESCRIPTION="Ubuntu 11.10"

    If you need more information, just let me know

    Thanks in advance,
    Sérgio
    Last edited by Sérgio André; November 30th, 2011 at 03:17 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •