Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

91–100 of 439 posts

Re: Sudo for Windows

#91

Earlier quoted context omitted.

I have been continually disappointed that Microsoft has not released a seamless Windows virtualization system. WindowsX would run the new, redesigned APIs, but all of the legacy could run inside a sandboxed system to give the world the required decades to finally transition.

Windows Subsystem for Windows?

Already exists, read up about "Windows on Windows" and "WOW64" :)

Re: Sudo for Windows

#92

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.

Why is admin privilidge even a thing? Ask for the god damn specific resource you want access to and I'll answer yes or no!

"Admin"'s identity is the resource you're asking permissions to use. If don't want identities, are you going to manually authorize every file that needs to be interacted with? For a recursive delete of thousands of files?

Re: Sudo for Windows

#93
post #84

If everyone thinks this is so great (just judging by the number of times it's appeared in the HN top 30), why don't they just run linux, instead of some sh!t immitation? Everyone knows, if you can C colon, your running a M$ product...

Linux is just some [explitive deleted] imitation of Unix, where the sudo command originated.

I run Windows as my primary development environment because it's better. Linux and other OSes run in VMs.

Re: Sudo for Windows

#94
This is good, but runas already exists. Its interface is shit. Improve it to make it not shit please. Don't hijack the name of an existing command unless you're going to re-implement its interface 100% compatibly.

This is like when PowerShell hijacked curl all over again...

Re: Sudo for Windows

#96
post #42

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

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?

Re: Sudo for Windows

#97

Earlier quoted context omitted.

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 externall…

I'm really amused that the least painful way to develop for Windows on Windows is to just use Linux.

Re: Sudo for Windows

#98

Can someone detail the differences between this and runas plz?

runas doesn’t pass current directory, or environment (at least the last time I used runas on Windows 10). I vaguely recall that runas has a kinda low limit on command line length, too ( I’m possibly misremembering that one).

Re: Sudo for Windows

#99
post #23

Next: systemd for windows?

Already there. Windows has had services for a long time managed pretty similarly to systemd/launchd.

Well, compare how to start syncthing automatically on Windows: https://docs.syncthing.net/users/autostart.html

On Debian I could just type:

systemctl --user enable --now syncthing.service

Native systemd on Windows would be awesome. Microsoft should hire the creator of systemd...

Re: Sudo for Windows

#100
post #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 rejuve…

There's still the UAC prompt which should help mitigate risk, plus it's locked behind developer settings.

that's good news
Post reply on HN