Is it correct to say that Windows UAC is conceptually the same as Linux sudo?
Can you point out the differences between the two?
UAC elevates the currently logged in user by giving it a system privilege needed to do something marked as needing administrator rights.
The point of UAC is to ensure that the actual physical user with administrative privileges wants an action to happen, not an automated process. There are three ways in which a process can run elevated:
highestAvailableand the user is an administrator
Sudo elevates the currently logged in user by changing the current user to root, or another user, and executes a command as that user. The list of commands and who can do what is defined in /etc/sudoers. Sudo does ask for a password, your password, but caches it for a time so you don't have to re-enter it. The point of sudo is allow a limited number of normal users to execute some commands that need to run as root, or other users.
Some things in Windows, such as installing devices, will ask for an administrator password if they do not have proper privileges to do something. This is somewhat like sudo, but unless you customize your rights assignments, users, and groups under Windows, any administrator can authorize the action.
Kind of. Normally, Linux's
sudo allows you to take on administrator privileges for a period of time. As does Windows's UAC. But,
sudo can also be used to do an action as another user, provided you have super user privledges.
Here is a MS site on UAC (Vista and 7 operate the same) - click here. The real important bit is this desciption of how the access tokens are handled for administrator and standard users:
"When an administrator logs on, the user is granted two access tokens: a full administrator access token and a "filtered" standard user access token. By default, when a member of the local Administrators group logs on, the administrative Windows privileges are disabled and elevated user rights are removed, resulting in the standard user access token. The standard user access token is then used to launch the desktop (Explorer.exe). Explorer.exe is the parent process from which all other user-initiated processes inherit their access token. As a result, all applications run as a standard user by default unless a user provides consent or credentials to approve an application to use a full administrative access token. Contrasting with this process, when a standard user logs on, only a standard user access token is created. This standard user access token is then used to launch the desktop."
It is possible to configure UAC in various ways. For a standard user the UAC prompt will ask for the login of an account with Admin rights, for a administrator user the UAC can either just ask for approval of the action or be configured to also require a login (the later deemed less secure by MS).