keskiviikko 21. tammikuuta 2009

runas is not behaving like Ubuntu's sudo

Please, correct me, if I am wrong, but shouldn't runas behave just like the sudo command in Ubuntu? Well, it isn't. sudo will ask the root password; runas just shows "the man page".


















Why this is so difficult to use compared to the sudo command? Actually, I have never got this little command to work the way I expect it to work. Again: Correct me, if I am wrong. Maybe I have just misunderstood the whole thing.

6 kommenttia:

  1. RunAs is RunAS and Sudo is Sudo.
    Don't mix different things

    VastaaPoista
  2. Why is it so difficult to run some applications in Windows even as an Administrator? Why cannot it just ask the Administrator's password and then give access to all the things (if password was correct)?

    VastaaPoista
  3. they're not the same
    runas is more like su than sudo

    runas /user:domain\username
    su username

    so:
    sudo = su root = runas /user:domain\administrator

    VastaaPoista
  4. A poor man's sudo.cmd that answers your problem also:

    :First set a password and enable the Administrator account as follows:
    :To set account password, enable, or disable accounts including "Adminstrator":
    :net user
    :net user /active:yes
    :net user /active:no
    :
    @runas /noprofile /user:Administrator "CMD /K"

    VastaaPoista