-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Readd root/admin user detection #6593
Conversation
In Windows Server, a single default user named Administrator is used on the every our host, and all user applications/services are run on his behalf (via RDP). We understand all the risks and agree with them, we take all the risks on ourselves. Where is the startup option that allows to bypass this (useless for us — me and my team) check and remove the warning?.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.oracle.com/en/java/javase/16/docs/api/jdk.security.auth/com/sun/security/auth/module/package-summary.html
There’s API to detect this properly, apparently. Could you please take a look at this instead?
Lynx and I came up with the solution used in 489bfa7, which uses Windows Security identifiers. This seems to match command prompt running as administrator correctly. I'm not very familiar with how Windows works, can someone who knows Windows a little better help confirm that this is the best way to check for this? |
Added to this, neither of us are running windows so if someone with access to a windows machine / windows-server machine could validate if this PR works correctly, that would be sweet 👍 |
MacOS should be checked too I think |
it already does |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
b0697bd
to
8f9d43f
Compare
This reverts commit 45c4f90.
This PR re-adds the root/admin user warning originally introduced in #2432. The original patch was reverted (ecfaff5) because of console spam issues on CentOS. In this PR, a different way of checking for for root/admin privileges is used, which shouldn't cause console spam on certain systems.
Tested on macOS 11.4, Ubuntu 20.04, Centos 8 and Windows Server 2022.