Can I give an application permanent permission (so I don't have to always enter pass)

Discussion in 'OS X Mavericks (10.9)' started by profchildermass, Dec 6, 2013.

  1. profchildermass macrumors newbie

    Joined:
    Nov 23, 2013
    #1
    I have an application that I run, somewhat frequently, and on start of the application it states:

    (app name) wants to make changes. Type your password to allow this.

    It's a bit annoying to always type the password for this particular application. Is there a way I can disable it for this app or somehow run the app to where the password is entered automatically?

    Thank you for your assistance.
     
  2. w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #2
    I don't really think so.

    You could probably make an Applescript that opens the app and types in the password but I'm not sure how secure that would be.
     
  3. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #3
    I'd be somewhat curious what app actually needs root permissions immediately on launch like that.
     
  4. profchildermass thread starter macrumors newbie

    Joined:
    Nov 23, 2013
    #4
    It's an app that we use for personal injury cases which calculates likely settlement offers on a variety of criteria.

    I thought of the applescript thing, but wouldn't know how to do it per say.
     
  5. Krevnik macrumors 68040

    Krevnik

    Joined:
    Sep 8, 2003
    #5
    Assuming the app is using a standard elevation dialog, I don't think Applescript can talk to it. Apple does protect those dialogs from some forms of automation explicitly to make it just a bit harder for malware to get root access on your machine.

    And I'd actually bring this up with your boss. Elevating like that is a security risk, and there's no reason an app like that needs it. All it is doing is wasting your time, and exposing a means for malware to burrow in your computer systems.

    Now, if you are determined to make this work, one option is to use sudo to launch the app, and that can be scripted. However, you need to disable passwords on sudo first. Again a security risk.
     
  6. w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #6
    Not too sure about getting the thing to go in the right box but using something like this Applescript might work:

    Code:
    tell application "some_application"
    activate
    end tell
    tell application "System Events"
    keystroke "my_password"
    keystroke return
    end tell
    
    If Krevnik is right about using sudo you could also probably do something like this bash script:

    Code:
    echo "my_password" | sudo -S open -a /path/to/my.app 
    
     

Share This Page