Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

171–180 of 439 posts

Re: Sudo for Windows

#171
post #133

Earlier quoted context omitted.

A tool like sudo should probably be sufficiently integrated with UAC to be able to customize that dialogue box...

You say that like Microsoft isn't an incredibly deeply dysfunctional company with absurd turf wars and conflicting interests between all the teams. You'd think it should be sufficiently integrated, but it's likely office politics made that impossible. How about be glad we got this at all as a first step, then maybe it will build momentum towards a better integrated solution?

You forgot that because of backcompat this solution will now become the unchangeable standard for years and anything more integrated will be in addition, not a replacement.

Re: Sudo for Windows

#172
post #2

Yep, it's really happening. Sudo is coming to Windows. It's obviously not just a fork of the linux sudo - there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. But the dream of being able to run commands as admin, in the same terminal window - that's the experience we're finally bringing to users. I've been working on this for the last few months n…

Why can't you do this with the tool that already exists to do the exact same thing, called runas?

Re: Sudo for Windows

#173
post #133

Earlier quoted context omitted.

A tool like sudo should probably be sufficiently integrated with UAC to be able to customize that dialogue box...

You say that like Microsoft isn't an incredibly deeply dysfunctional company with absurd turf wars and conflicting interests between all the teams. You'd think it should be sufficiently integrated, but it's likely office politics made that impossible. How about be glad we got this at all as a first step, then maybe it will build momentum towards a better integrated solution?

[flagged]

Re: Sudo for Windows

#174
post #164

Earlier quoted context omitted.

Windows and Linux already share dozens of commandline commands with the same name and have different behaviors.

This doesn't mean this isn't an issue, and that the issue should be worsened. Of course, it being an issue is an opinion (of mine), see my daniel.haxx.se link from my other comment next to yours for a motivation of this opinion.

The situation with curl is different because these are unix utilities you can run on Windows (hence the issue).

Now "sudo" is not a very Windows-y name for this utility but it has the advantage of being self-descriptive by those most likely to use it. It's sudo... for Windows. You don't have to explain it further.

The command line namespace is flat and there are only so many letter combinations, the idea that an OS shouldn't reuse a command name from a different OS is pretty limiting.

Re: Sudo for Windows

#176

When I was at Microsoft we did not use to consider UAC as a security boundary, since there were ways to bypass it. (I used to work on windows kernel security). I wonder how security team let this feature get shipped. Or perhaps now they consider UAC as a security boundary.

How can you bypass UAC set on the highest level?

Re: Sudo for Windows

#177
post #58
post #21

We already have runas for years now. This looks like one of those KPI fulfilling projects.

> This looks like one of those KPI fulfilling projects It actually wasn't. This has been one of the top community requests for the Windows Command Line for years. Literally, for like, the entire 8 years I've been here, we've been talking about if there was a way to do Sudo for Windows. This was done because it makes developers happy, plain and simple. If that's a KPI, then that's the one we're optimizing for.

There are several ways to do sudo for Windows already, to the extent this program does sudo for Windows.

In other words, you're not actually solving the reason people are asking you for sudo for Windows. How do I configure my sudoers policy to allow someone to run a specific application (and only that application) through sudo? THAT is the magic of sudo. Sudo is not just "use your own password for root" like you seem to think it is.

Re: Sudo for Windows

#178
post #36

What's the difference from opening a Terminal (Admin) window? Just that you can run a single command as admin? I must be missing something here

> Just that you can run a single command as admin? I mean, that's sudo's whole thing! [1] You can live your day to day terminal life without the risk of borking things too badly, then when you occasionally need to elevate to higher privileges you can do it easily for that specific command. [1] Technically not the whole thing obviously, but it's a very common use case.

That has nothing to do with sudo; you could do the same with su -c long before sudo existed...

Re: Sudo for Windows

#179
post #2

Yep, it's really happening. Sudo is coming to Windows. It's obviously not just a fork of the linux sudo - there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. But the dream of being able to run commands as admin, in the same terminal window - that's the experience we're finally bringing to users. I've been working on this for the last few months n…

Why can't you do this with the tool that already exists to do the exact same thing, called runas?

Also 'start -Verb runas' in Powershell.

Re: Sudo for Windows

#180

Earlier quoted context omitted.

Initially I thought ur concern is crazy as hell, because who would implement it in such a painful way? But then I read >When elevating a process from the command-line with sudo, a UAC dialog will appear asking the user to confirm the elevation: LOL But it seems like there are other ways to use it without this dialog >In this configuration, sudo.exe will launch a new elevated console window and run the command in that…

Having the sudo command open an entirely separate terminal as an admin user is absolutely ridiculous and completely on brand for Microsoft. Along with the UAC dialog, I can't think of a worse way for sudo to behave. What's wrong with entering your password for sudo? How is UAC more secure than a password?

A terminal password prompt can be intercepted by a keylogger and similar things.

UAC is safe from that.

Post reply on HN