Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

51–60 of 439 posts

Re: Sudo for Windows

#51
sudo on windows has a different risk profile given the malware ecosystem and lack of educated/ trained users.

95% of linux users are developers who understand risk -- though are prone to mistakes

99% of windows users are casual consumers .

Let's keep this functionality narrowly accessible : restricted to developer mode and very formal consent. I suggest disabling it if it's unused for a few days

this will only rejuvenate the malware market.

Re: Sudo for Windows

#52

This adds a factor of enshittification for NT, NT doesn't need 88 line PowerShell scripts, this "sudo for Windows" thing makes Windows seem like a teenager's high school project. Windows NT already has runas, let NT be NT and let POSIX have sudo/doas. Previously Microsoft hired the best of the best operating systems engineers in the USA who were from Digital and they proved to be people capable of making an operating…

Thanks? But sudo * isn't a 88 line PowerShell script, it's a 1800 LOC Rust binary * isn't a NT kernel feature, it's a usermode executable * was made by (in my opinion) a perfectly decent engineer. That may be thinking too highly of myself though.

Re: Sudo for Windows

#53
Can you draw the part of the diagram in the blog post based off of these sentences? https://devblogs.microsoft.com/commandline/introducing-sudo-...

In these configurations, sudo.exe will launch a new elevated process, an elevated sudo.exe process, and the original unelevated sudo.exe will establish an RPC connection with the new elevated process. In other words, information is passed from the unelevated sudo instance to the elevated one.

Re: Sudo for Windows

#55
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.

Sudo also allows you to control which commands can be elevated to admin.

It also lets you elevate to admin without knowing the admin password, you elevate with your normal account password. Effectively, some commands can execute as admin, but the user generally cannot.

So you can allow limited administration without giving everything away.

Re: Sudo for Windows

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

[flagged]

that’s rude and unfair.

I really dislike windows but there’s a decent amount of good stuff in there.

it’s just buried under the popups, ads, strange behavior and terrible business practices that are hostile to interop. This helps change that b

IOCP is dope.

Re: Sudo for Windows

#57

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.

Re: Sudo for Windows

#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.

Re: Sudo for Windows

#59

Can you draw the part of the diagram in the blog post based off of these sentences? https://devblogs.microsoft.com/commandline/introducing-sudo-... In these configurations, sudo.exe will launch a new elevated process, an elevated sudo.exe process, and the original unelevated sudo.exe will establish an RPC connection with the new elevated process. In other words, information is passed from the unelevated sudo instance…

Yep, that's basically the entire diagram. The information that's passed is basically just the commandline, env vars, and a handle to the console of the unelevated sudo's console. Once it's got a handle to the console, the elevated sudo can spawn the target app attached to the original console, rather than a new one. Simple as that!

Re: Sudo for Windows

#60

Interesting. I've been pretty happy with all the Unix-related updates they've put out lately. WSL has been a godsend and the new terminal and powershell have worked a treat. Glad they seem to be continuing with it.

My theory is that Microsoft is working on eventually moving Windows over to the Linux kernel, and all these things they are doing are setting the stage and preparing for an easier transition.

As I said on the other post, I strongly doubt that. It offers few benefits and many roadblocks. It would be a monstrous amount of work, would throw into question many existing security-related certifications, break Microsoft's love of backwards-compatibility, etc.

All MS is trying to do is make it easier for developers to develop on Windows for Windows, which it has ample incentive to do both internally and externally.

Post reply on HN