-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Run as administrator" doesn't seem to be working #82
Comments
Works fine on 10.12.1. If I wrap the following script in a Platypus app set to run with admin privileges:
I get the following:
You are aware that running AuthorizationExecuteWithPrivileges() is not equivalent to running AS the root user. Rather, it is run with root privileges. See documentation. |
I'm running a python3 script with this code:
and it does not yield the expected result of |
Hmmm, strange. What version of macOS are you running? Which python interpreter? Could you try running |
@sveinbjornt no offense, but I'm not going to run your application with root privileges on my system... 😄 I'm sure it's clean and you have no malicious intend in mind - I'm just paranoid. I'm using pyenv and python3.6 installed to |
Well, you're running my code any time you authenticate a Platypus-generated app... :) Anyway, could you create an app that authenticates from the following script and tell me your result:
|
@sveinbjornt output:
looks correct... I'm trying to use the "None" interface - maybe there is something wrong there? |
If I use this python3 script:
I get:
which is not what I was hoping for... Any ideas? |
Strange. I tested this on Python 3.7 installed via Brew, and everything worked as it should:
|
Thanks for testing this again @sveinbjornt - what shebang and "Script Type" did you use on your system? |
Platypus apps don't use the shebang line to determine the interpreter when they execute scripts. I had set the Python3.7 binary in /usr/local/bin/python3 as interpreter. This issue may be related to #97 . /bin/bash cannot run directly as root, it seems. Perhaps a similar issue is affecting your python build. |
ugh - that sounds like a serious drawback if the shebang is just ignored... |
The shebang line is just meta-data for the shell to determine which interpreter to use when the script is executed without specifying an interpreter directly in the shell command. E.g.
But of course, Platypus-generated apps don't run scripts in a shell. However, the shebang line IS used to infer which interpreter to use. When you drag a script on the Platypus application, it intelligently parses the shebang line for an interpreter and configures the GUI controls accordingly. When the ensuing Platypus-generated app actually runs, it uses the interpreter (and arguments etc.) specified in a file bundled with the app (AppSettings.plist). You can always press the Args button in the Platypus main window to see the command used to execute the script. |
Any luck with the system python? |
I'm also experiencing this issue on MacOS Mojave Version 10.14.2 (18C54) using the system python version 2.7.10. No other versions of python are installed. |
@PaulVaroutsos I cannot reproduce this. You're using the /bin/sh interpreter, right? Here's a thought: This might be related to whether SIP is enabled. I always turn the damn thing off because I like mucking about with the OS. Maybe SIP somehow cripples the system Python install. |
@sveinbjornt My system:
|
I was using /usr/bin/python, which Platypus auto-populated when I selected my Python script. The python script includes the shebang. I also get: |
Hi, I am experiencing the same problem with |
@simone-pignotti It looks like /bin/bash cannot run as root. See #97 |
I see, thank you! |
@sveinbjornt I am able to run bash scripts as root now. Not sure if this was an OSX upgrade. |
Probably, this is broken with the newer Mac OS updates
The text was updated successfully, but these errors were encountered: