Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

121–130 of 439 posts

Re: Sudo for Windows

#121
post #71

Earlier quoted context omitted.

That requires you to open an new terminal window. You've never been working in a standard terminal, tried to run a command that requires elevation, and been annoyed that you have to open a new window losing your command history? Or forgot to Run As and opened a non-elevated terminal by accident?

"In this configuration, Sudo for Windows will open a new elevated console window and run the command in that window. This is the default configuration option when sudo is enabled"

That's the default option but you apparently can still run the elevated command in the current window if you want.

Re: Sudo for Windows

#122
post #7
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…

Nice to see the author here! I have to say: I really like whats going on in Windows world from a developer perspective in the recent years. I am a hardcore Linux fanboy for decades but I have to admit that PowerShell, WSL, vscode, Windows Terminal and the recent open source strategy sounds very appealing to me. This is something MS/Win does much better in recent days compared to, for instance, Apple/Mac OS. I would l…

I'd love to see winget with a command structure that makes sense. Currently if I want to install python via winget, I have to run `winget install -e --id Python.Python.3.11`. -e? --id? What are these for? Why do I have to memorize them? Almost every other package manager just does something like `packagemanager install python`, and then you can supply args for versions if you like.

Also winget does not have python 3.12 which was released 4 months ago.

Re: Sudo for Windows

#123

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?

Opening another terminal is one thing this new sudo can do. It's also possible to configure it to run the sudo'd command inline in the current window (mentioned in the linked blog post); there are security tradeoffs to consider.

Re: Sudo for Windows

#124
post #115

Ironic, didn't we find out they had patented sudo a decade ago? https://arstechnica.com/information-technology/2009/11/micro...

The article you linked answers your (presumably rhetorical?) question: no, but they probably did patent PolicyKit.

Re: Sudo for Windows

#126

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?

It’s basically what Apple did when moving from OS 9 to OS X. Old applications would load up in Classic, allowing users to start using the new system, while developers had time to update their apps.

Re: Sudo for Windows

#127
post #22

Earlier quoted context omitted.

You can edit the issue to be whatever you want later. But I’ve never seen anyone pre-reserve issue numbers like this.

We've actually done that for a few years on the Terminal repo. It's great for things like megathreads / scenarios / epics. For example, I can tell you off the top of my head that microsoft/terminal#8888 is for "quake mode", and #4000 is the extensions thread. We even used to have a bot that would auto-camp anything that was a multiple of 1000 or 1111 :D

That's a rather fun hack for issue numbers. Of course, a more robust strategy would be to have a specialised short-link generator for special issues!

Re: Sudo for Windows

#128
Sad that it's Windows 11 only. I can't upgrade. I have a normal, recent PC that I dual boot with Linux, and Microsoft wants me to keep Windows 10 in that constellation. Upgrading is prevented by a silly if statement, and there's nothing I can do. It's the first time a software vendor actively doesn't want me to to have their latest software, but it is what it is.

Re: Sudo for Windows

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

that's the standard microsoft way

embrace (copy sudo), extend (add incompatible options), extinguish

Re: Sudo for Windows

#130
post #103

Earlier quoted context omitted.

If you’re running as local admin you just get the dialog, but you’re not using a local admin as your daily driver user acct, right? ..Right? :) If you’re logged in as a standard user, UAC prompts you for new username and password to authenticate and authorize the privileged operation.

Seems like a horribly convoluted way to manage permissions. Also I have never heard anyone suggest you shouldn't use a local admin account. That's the exact problem UAC was meant to solve. Having used an unprivileged Windows account, all I can say is no thanks. It's a huge burden if you do anything even slightly more complex than Facebook and email. As a blanket policy at work, all programmers are admins, everyone el…

Nobody does what you describe. When someone has a genuine need for local admin access, they are given two accounts - an unprivileged account to log in with, and a privileged account to enter into UAC when needed. It would indeed be an unbelievable waste of time to make your IT staff sit next to users to enter admin credentials, which is why nobody does it.

And for the record, "don't log in with a local admin account" is a very commonly recommended best practice for Windows environments. It's unusual that you've never encountered it.

Post reply on HN