Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: sudo

22 Jun 2011   #1

7 64bit Ultimate

I've tried using the code at http: // but haven't had any luck getting it to work.

The Un*x sudo/sudoers setup is so clean in implementation, why is this so hard...

My System SpecsSystem Spec
22 Jun 2011   #2

Windows 10 Pro (x64)

Probably because this is Windows and not Linux? Just use UAC and Runas.
C:\Windows\system32>runas /?

RUNAS [ [/noprofile | /profile] [/env] [/savecred | /netonly] ]
        /user:<UserName> program

RUNAS [ [/noprofile | /profile] [/env] [/savecred] ]
        /smartcard [/user:<UserName>] program

RUNAS /trustlevel:<TrustLevel> program

   /noprofile        specifies that the user's profile should not be loaded.
                     This causes the application to load more quickly, but
                     can cause some applications to malfunction.
   /profile          specifies that the user's profile should be loaded.
                     This is the default.
   /env              to use current environment instead of user's.
   /netonly          use if the credentials specified are for remote
                     access only.
   /savecred         to use credentials previously saved by the user.
                     This option is not available on Windows 7 Home or Windows 7 Starter Editions
                     and will be ignored.
   /smartcard        use if the credentials are to be supplied from a
   /user             <UserName> should be in form USER@DOMAIN or DOMAIN\USER
   /showtrustlevels  displays the trust levels that can be used as arguments
                     to /trustlevel.
   /trustlevel       <Level> should be one of levels enumerated
                     in /showtrustlevels.
   program         command line for EXE.  See below for examples

> runas /noprofile /user:mymachine\administrator cmd
> runas /profile /env /user:mydomain\admin "mmc %windir%\system32\dsa.msc"
> runas /env / "notepad \"my file.txt\""

NOTE:  Enter user's password only when prompted.
NOTE:  /profile is not compatible with /netonly.
NOTE:  /savecred is not compatible with /smartcard.
My System SpecsSystem Spec
22 Jun 2011   #3

7 64bit Ultimate

Indeed, this is Windows, but I was using the Un*x solution as an example of an implemented solution, not as a espousal of its use.

The whole idea of the sudo command is that a prior list of users and programs is established by an Administrator; thereafter those users may execute the selected commands at a higher privilege. The list itself is not editable by normal users of course.

To the best of my knowledge, any variation of runas still requires a password to be entered. That's been stated here several times.

The code at the Sourceforge sudowin site seems ideal, according the the fairly ambitious description by its author, and I was just wondering if anyone else had any experience with it.

My System SpecsSystem Spec

22 Jun 2011   #4

Windows 7 32 bit

Did you try asking the authors? Sudo for Windows: Forums
My System SpecsSystem Spec


Thread Tools

Similar help and support threads
Thread Forum
Sudo for Windows.
I am not using Windows 7 lately, and nobody in my firm uses it anymore. I don't know what to do. For instance, I decided to unisntall an old version of calibre, and install the new one. Windows takes more than one hour to do such a simple task. A dialog with a message "Wait while Windows...
General Discussion

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:18.
Twitter Facebook Google+ Seven Forums iOS App Seven Forums Android App