January 21, 2005

How to run a program as another user in Windows

Thank you Gisle, I knew there was support for "sudo" in Windows XP, but I have never used it.

As most of you know, most single users run their Windows setup as administrators, giving any program or script full access through your user at any time. Its one of the largest security problems facing Windows machines.

But there is a way to use Windows with a limited user and quickly change to administrator level when needed.

gisle's blog : MS Windows knows how to sudo. Use it!

Windows was born in a single user environment. The end user of a Windows machine was also its administrator, responsible for such tasks as installing new software, performing back-up and other maintenance tasks. This meant that for early versions of Windows, there was no restrictions on what the end user was allowed to do. Whoever was sitting in front of the computer was also its master.

[Via Anders Jacobsen's blog]


Comments

The article that you link to is *TOTALLY* wrong!
The "RunAs" is not what "sudo" really is.

When one uses sudo - he has to provide *HIS* password - not administrator's! The proper use of sudo involves the configuration file (/etc/sudoers on UNIXes, maintained by root) where all the permitted users and programs are listed.
Anything beyond /etc/suduers is prohibited.
So, on the real UNIX - sudo allows to do admin's tasks with admin's previous concent - without the knowledge of admin's password.

RunAs is just a "/bin/su" equivalent - one must know *ADMINISTRATOR*'s password to use it. Once you gave out the administrator's pass - you're doomed!

Please, don't mislead people!

Posted by: Tony - kl: 16:59, 28 July, 2005 - #11581