0

Windows only show [Yes] or [No] for the same thing as Linux's sudo. macOS/Linux both require you to type the password. Is the password-less Windows implementation almost as secure as password-requiring macOS/Linux's impersonations? If so, why can't macOS/Linux do the same thing (requiring only clicking Yes for a user with sudo ability)?

enter image description here enter image description here enter image description here

6
  • That dialog only comes up when Windows has a weak UAC configuration. With a strong UAC configuration it asks for a password as well.
    – Ben Voigt
    Nov 10, 2022 at 16:01
  • @BenVoigt I have never seen UAC requiring password, unless the user is not in the administrators group, in which case I must enter the ID/password of a user in the administrators group. But even if it is true, that "weak configuration" is the default setting for any Windows version including those used in business environments. In that case, doesn't it mean that Microsoft is fairly sure that that method of just clicking Yes is secure enough? Nov 10, 2022 at 18:58
  • No, the default weak configuration stems from the official Microsoft position that "UAC is not a security boundary"
    – Ben Voigt
    Nov 10, 2022 at 19:36
  • Also probably the reason you haven't seen the more strict configuration is that it's a setting in "Local Security Policy" and not in the control panel. learn.microsoft.com/en-us/windows/security/identity-protection/…
    – Ben Voigt
    Nov 10, 2022 at 21:06
  • @BenVoigt So, Windows does not have any special mechanism to prevent a malicious app from programmatically clicking "Yes" on the UAC dialogue? Nov 11, 2022 at 3:56

1 Answer 1

0

No, it is not. Windows User Account Control (UAC) presents that dialog when your user is a member of the Administrators group. If you click "Yes", you will elevate the process with the ability to modify anything on the system. And if the requesting process were a malware application, the results could be disastrous.

On a secure computer, your process would be granted access only to the information and resources needed to complete the task at hand. This is described as adhering to the principle of least privilege (PoLP). Since macOS and Linux adhere to this, they is no need for something like UAC. The following Super User post puts this in perspective for macOS:

What does the sudo command do?

The first step toward that on Windows is to remove users not solely dedicated to system administration from the local Administrators group. With that measure taken, UAC would instead present a dialog is similar to macOS and Linux:

enter image description here

But how would you run an application with elevated privileges as needed without the Administrator having to credentials every time? A macOS or Linux system administrator would have the option of granting you a PoLP adherent "sudo privilege" to fulfill a similar request. Windows does not include that facility, but Microsoft does provide the following guidance:

Implementing Least-Privilege Administrative Models

Privileged Access Management (PAM) tools can be used to fill this need for Windows, and to improve it on other platforms like macOS or Linux. Gartner Peer Insights provides reviews and ratings of PAM software:

Privileged Access Management (PAM) Tools Reviews and Ratings

If you have a smaller network, or if you simply want to emulate macOS/Linux sudo privilege delegation on Windows, there are some free, open-source alternatives you might consider:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .