Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

131–140 of 439 posts

Re: Sudo for Windows

#131
post #42

If it's just an alias for "runas" that presents a UAC prompt window I will be disappointed.

Isn't that what askpass does in every modern Linux desktop UI?

Yes, which is why it's silly for people to act like there's something wrong with MS doing the same. Some people will grasp at any straw to bash MS.

Re: Sudo for Windows

#132
post #107

Earlier quoted context omitted.

The best way would be, if it could say something like: Allow $PARENT_PROCESS_NAME to run $COMMAND with administrator rights. So if you would enter the following in cmd.exe: sudo notepad.exe ... It would say: Allow Command Processor Shell to run notepad.exe ... with administrator rights.

Maybe for Windows 2025 we can work with the UAC folks to get something like that. I'm still shocked to this day that we managed to ship this at all. One step at a time :)

> I'm still shocked to this day that we managed to ship this at all

Why?

Re: Sudo for Windows

#133
post #67

Earlier quoted context omitted.

Yea, that's a limitation of UAC at this point, and probably not one we can avoid. The "Show details" dropdown on the dialog does however show the commandline you requested, so at least that's one way of making sure it's the thing you ran

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?

Re: Sudo for Windows

#134
post #45

Earlier quoted context omitted.

Opening a terminal in admin window which means any commands you put in that windows will always have admin privilege, no matter what. What does Sudo is to only provide the root/admin privileges for specific inputted command. Once it is done, it goes back to user privileges. This way, the terminal window didn't need to end the session to go back to user privileges.

That's a very slim proposition value, especially when multiple commands in a row require admin privileges.

That's like saying (in a Linux context) "sudo is dumb because you can just use su". The two tools have different use cases.

Re: Sudo for Windows

#135
post #132
post #107

Earlier quoted context omitted.

Maybe for Windows 2025 we can work with the UAC folks to get something like that. I'm still shocked to this day that we managed to ship this at all. One step at a time :)

> I'm still shocked to this day that we managed to ship this at all Why?

Sorry, have you never read anything about Microsoft before? I'm not sure why people are being so critical of OP.

Re: Sudo for Windows

#136
post #30

Earlier quoted context omitted.

Windows 10 is EOl next year. I would bet your company has plans to move to 11 at some point in the near future. I work with customers daily to help to move to 11

> I work with customers daily to help to move to 11 What issues are your customers having that they need profesional help to upgrade to a new Windows OS?

Is this a serious question?

Re: Sudo for Windows

#137
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…

I think they should've named it something else to avoid confusion, especially if it doesn't have the same behavior as unix sudo. If it has different arguments and features, imagine the confusion of unsuspecting users searching how to use sudo in the future.

They've done it with curl: they made an alias to their own program not supporting the same feature set and it inevitably backfired [1]. sudo is a complex program with a lot of different options [2] and as people from MS said here, it's never going to be compatible because of how Windows works differently.

While I understand picking a familiar name, sudo is certainly not the only player, there's also doas. This shows people can adapt to another name and another name would have seemed more appropriate.

edit: whoops, it was already mentioned in this thread [3]

[1] https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...

[2] https://linux.die.net/man/8/sudo

[3] https://news.ycombinator.com/item?id=39305452#39309126

Re: Sudo for Windows

#138
post #42

If it's just an alias for "runas" that presents a UAC prompt window I will be disappointed.

Isn't that what askpass does in every modern Linux desktop UI?

Yeah. But I think their point is that there should be a CLI equivalent of the UAC for Windows “sudo”

Re: Sudo for Windows

#139

This will be a very controversial prediction, but mark my words: Windows will eventually use the Linux kernel.

I hope you’re right! They sort of did the same thing already with Edge given it’s just Chromium under the hood. Reminds me of a specific thought experiment with a boat.

The Ship of Theseus https://en.m.wikipedia.org/wiki/Ship_of_Theseus

(For today’s 10000 (https://xkcd.com/1053/))

Post reply on HN