-
Notifications
You must be signed in to change notification settings - Fork 115
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
Unable to run as user (PATH issue) #187
Comments
If openvpn is not in your PATH, that is a problem. even If we skip the which test, it needs to be run from openpyn. You have to add it to your PATH. |
The issue is 'which' is testing the users PATH. The command itself is not, as far as I can tell, actually called by that user but by root (via sudo). As a result it is root's PATH that should be tested. openpyn-nordvpn/openpyn/openpyn.py Line 885 in d329ec2
|
It now runs without requiring to be started as root/ via sudo. Is the last of the checks in the patch meant to be commented? Running "sudo which openvpn" does produce a valid path ("/usr/sbin/openvpn"). I have been trying to find the default PATH for a number of other distros to see if this is unique to Debian or if it affects other distros as well. |
"Is the last of the checks in the patch meant to be commented? Running "sudo which openvpn" does produce a valid path ("/usr/sbin/openvpn")" |
I have a similar problem when running
|
Do not install it with --user. When you run "sudo openpyn". root account has no clue where it is. |
If this is sorted, I'll close the issue |
I know as you said it prompts for installation, but being commented won't the last line pass anyway without openvpn being present? |
Yep I don't think this works as it is |
Just a quick update. Buster introduces /sbin and /bin merged with /usr/sbin and /usr/bin by default. The usrmerge package in Sid allows you to convert existing system. Unfortunately the default path still doesn't include /sbin or /usr/sbin so which openvpn still needs to be run via sudo. |
Have a look at #225 |
The main issue is OpenVPN. unzip and wget are available in user path regardless of merged /usr (usrmerge) or not. OpenVPN being in /usr/sbin or /sbin on Debian is the reason for needing check via sudo. #255 looks to prevent a lot of the root requirements but unfortunately in its current form doesn't solve this issue. On a more positive note, apparently when OpenVPN 3 comes along it'll bring a dbus interface for handling connections as well as python support. Apparently this means root will not be required. |
openpyn-nordvpn/openpyn/openpyn.py
Line 232 in d329ec2
OS: Debian Sid
Having seen a number of warnings regarding notification support when run via sudo, I have attempted to run the app as my normal user. Startup fails however performing the checks linked above.
All the apps reside in /usr/bin except for openvpn which is in /usr/sbin, which isn't stored PATH, so fails the 'which' test.
The text was updated successfully, but these errors were encountered: