Wouldn't it make more sense for there to be a 1:1 relationship between user and user account?
I'll assume by user you mean "physical person".
Whether or not that user is allowed to invoke privileged operations can then be fully contained in the user account definition, not out in headspace depending on whether that user knows the credentials for another account altogether.
Ok, I'm pretty sure you don't understand how sudo works then. sudo uses your current password to allow you to run commands as a different user. There are no extra credentials to remember.
Why don't Unix admins run as root all the time? Answer I usually hear is to keep them from accidentally doing Bad Things without being fully aware of it. 'sudo' effectively becomes a "yes, I really mean it" operation just like UAC, even though it is implemented as a secondary user logon.
Well, and it provides a way to control access to root privileges in a far more centralized and easy to control way than just giving people the root password.
But beyond that, I think the UAC in Vista is a very poor imitator of sudo. I really wouldn't ever call them "just alike" because whereas (imho) UAC adds only the perception of security, sudo enforces actual security.
You have to be in the Administrators group to use it without a password. Both you and your user account are already authorized to escalate programs on demand. Sounds guarded to me.
Ok, thanks for that clarification. But you're thinking in the Microsoft-centric way which is bad for security, it's not just about the user, but applications as well.
Here's the thing, an effective security model sandboxes things from each other so that a compromise in one area won't compromise everything. If Sally and Henry each use a computer, and Henry downloads spyware, (or viruses, or some other badware) you don't want it affecting Sally if you can help it.
Microsoft has always been terrible about making Windows so flexible out of the box that it effectively has no sandboxes. In XP, Sally and Henry are almost certainly both admins, and Sally is affected by Henry's spyware.
In OS X (or any Unix, really), Sally and Henry might be sudo'ers. The spyware will affect Henry, but when it tries to affect Sally, it needs to sudo and have Henry enter his password. There's no way for the application to affect the system without user intervention. (and if Henry provides that intervention, there's no technical security in the world that will help you. But it's the OS'es job to make every effort up to that point)
But what if you have just an ok box? What stops badware from just providing the confirmation?
Well, Vista tries to by basically grinding the whole os to a stop and forcing you to make a yes or no decision right there. Does it work? Maybe/maybe not. It certainly provides a huge surface vector from which to attack, not to mention the pure annoyance of that method. You can say you prefer Vista's method, but it's definitely less guarded.
But if you really absolutely must do it without a password, I believe you can
configure /etc/sudoers to not require a password. I'll be honest to say that I haven't tried it, and I don't know if the OS X gui would follow along, and that I would advise against it in the strongest possible terms, but you can give it a whirl if you must.
The real user in a user-account switching scenario already has the rights to do whatever sudo is stopping. It's just the system isn't aware of this mapping.
See, this is why you need to do a little more research. sudo doesn't stop anything. sudo provides a door for you to open to get wherever you're going. (after proving to the guard you should be allowed to)
Windows is counting on UAC to slam the door shut on you if it thinks you shouldn't do something.
What's the security difference? Well imagine if both of them fail. If sudo fails, that's inconvenient for you, but your system is perfectly secure.
If UAC fails, all the doors stay open and everything runs amok.
Part of the criticism for Microsoft's hacks (and that's what UAC is), is that they don't really work through all the consequences. If sudo fails, you really don't have to worry about it, and fixing it is on your own time table. If UAC fails, that could be a big security issue.
I don't see how sudo protects against a user deciding to run an untrustworthy application. 'sudo ./malware' will work just fine.
see above.
I do a lot of work with security professionally, but have not done much with Unix until recently. I find the differences in operating systems interesting and never as simplistic as 'one is good and the other is bad'.
I agree. I see one as working consistently, well, and securely.
I see the other as totally worthless and useless marketing hype.
Here, I think UAC is given an unfairly bad rap from the very people who should be applauding Microsoft for making a much more serious effort at security than they have in the past.
Actually, I would deride Microsoft even harder for hoisting this petard on us and pretending it's good security. It really doesn't do much in the way of helping us get away from Windows users running as admins.
IOW, we wanted to see real security progress and Microsoft gave us a load of bull. Of course people are going to deride Microsoft for that, and of course Microsoft is going to deserve every bit of it.