Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it correct to say that Windows UAC is conceptually the same as Linux sudo?

Can you point out the differences between the two?

share|improve this question
1  
unless you want to get into the nitty-gritty about user roles in the two OSs, I don't think you're going to get a good list of differences between the two. –  Patrick Feb 8 '11 at 5:34

3 Answers 3

up vote 1 down vote accepted

UAC elevates the currently logged in user by giving it a system privilege needed to do something marked as needing administrator rights. UAC does not ask for a password. The point of UAC is to ensure that the actual physical user wants an action to happen, not an automated process. AFAIK you can't change what things in Windows produce a UAC prompt and what things do not.

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..

share|improve this answer
1  
It is configurable (in the "sudoers" file) whether the user needs to authenticate by providing his/her password. The default is to require this, but it sometimes makes sense to turn it off; e.g. for certain commands. –  Stephen C Feb 8 '11 at 16:36
1  
Unfortunately, UAC does not work this way. technet.microsoft.com/en-us/library/cc709628%28WS.10%29.aspx –  surfasb Dec 1 '11 at 9:13
    
@surfasb, that's a good article and I learned a bit from it. –  ultrasawblade Dec 1 '11 at 12:02

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.

share|improve this answer
3  
Sudo allows you to do an action as ANY user provided you know your OWN password and provided you have the appropriate sudo permissions –  David Harris Feb 8 '11 at 4:02
1  
He probably just got confused with su –  atx Feb 8 '11 at 4:27
    
@DavidHarris: Fixed my answer, thanks for the correction. –  Wuffers Feb 8 '11 at 13:20
    
You don't necessarily need super user permissions... –  Diablomarcus Feb 8 '11 at 16:42

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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.