-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Windows: Introduce 'Non-Admin' mode #1073
Conversation
The next change is to Add full parameter expansion - Change to:
Then create a new Windows Start menu item:
|
FTR: This has passed my local tests: Win10, full rig. I believe this is the correct approach to informing a user that they are in a non-admin mode. They must select it by choice. Otherwise, |
This allows Easy-RSA to be run in a User's Home directory. The problem is ONLY caused by 'Windows User Access Control' feedback: Easy-RSA executable 'mkdir.exe' does not receive an error-on-failure when Windows UAC has not granted write access to the OpenVPN system directory: '\Program Files\Openvpn\easy-rsa' This means that easyrsa cannot successful verify directory creation by using only the exit status of command 'mkdir.exe'. Instead, easyrsa must also check that the directory was created via '[ -d pki ] || foo'. The following changes are required: * Changes to 'easyrsa-shell-init.sh': Allow options to be passed from the command line. The only supported options are: /na or --no-admin This non_admin mode will change directory to the User's Home directory and then make full write-access checks on the Home directory. In standard mode, the full write-access checks will be run in the default system folder. And, unless the Windows UAC has granted write access, these checks will fail as intended. A helpful error message is then printed. * Changes to 'EasyRSA-Start.bat': Allow command line options to be passed onto 'easyrsa-shell-init.sh' For Openvpn-build: This also allows the creation of a new Windows-Start Menu item: * 'Start EasyRSA Shell (Non-Admin)' Which can pass the '/na' or '--no-admin' flag to 'EasyRSA-Start.bat' Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
1046770
to
c2823c4
Compare
This is probably another issue, but when I do
|
@lstipakov A hang on Win11 would be another problem. Possibly related to this PR. Can you please open a new issue for that, specifically. Note: I am aware that @lstipakov was testing Easy-RSA |
Status:
|
With this change my problem is resolved - no hangs anymore and I got notified that either I need to run
see the
|
Thanks, PR on the way for both of these.
Do you mean that the windows closes back to the desktop or that "nothing happens" and the window remains ? If the window closes then that is the expected behavior. |
|
I do not have access to Win11 to test ,however, you can test this like so:
If all that fails then please try this in the same EasyRSA shell:
|
Same results - |
I have added a shortcut to the MSI, but found a problem with
This doesn't happen when I run |
This is very disappointing news -- This means that |
This is due to calling There is a test we can try:
It may be necessary to edit
Thanks for helping with this. |
@lstipakov FTR: Are you testing with Windows Command or Terminal ? Or both ? |
@lstipakov I just spotted an error: When using non-admin mode, you must call |
There is one specific issue which I cannot fix:
I am opening a new issue for this: #1075 |
Running Could you fix this typo please:
|
#1075 has not been resolved. Can you please build a CA and at least one certificate and let me know if that works.
It has been fixed. |
Apparently not.
it just stays there and nothing happens. |
@lstipakov Can you please try running these commands:
This should show the confirmation message to remove the current PKI. |
@lstipakov I have a small patch that I would like you to (Edits: Corrected and tested)
As you can see, this changes Please
Thank you. |
I applied patch manually (
|
Can you please add |
The PR merged in this thread has already been proven to work by @lstipakov ,thanks. The follow-up development has been moved to: #1076 |
This allows Easy-RSA to be run in a User's Home directory.
The problem is ONLY caused by 'Windows User Access Control' feedback:
Easy-RSA executable 'mkdir.exe' does not receive an error-on-failure when Windows UAC has not granted write access to the OpenVPN system directory: '\Program Files\Openvpn\easy-rsa'
This means that easyrsa cannot successful verify directory creation by using only the exit status of command 'mkdir.exe'. Instead, easyrsa must also check that the directory was created via '[ -d pki ] || foo'.
The following changes are required:
Allow options to be passed from the command line.
The only supported options are: /na or --no-admin
This non_admin mode will change directory to the User's Home directory and the make full write access checks on the Home directory.
In standard mode, the full write access checks will be run in the default system folder. And, unless the Windows UAC has granted write access, these tests will fail as intended. A helpful error message is then printed.
Allow command line options to be passed onto 'easyrsa-shell-init.sh'
For Openvpn-build:
This also allows the creation of a new Windows-Start Menu item: