Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

231–240 of 439 posts

Re: Sudo for Windows

#231

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!

Is that the shiny new capabilities based future that never arrives?

Re: Sudo for Windows

#232

Earlier quoted context omitted.

It’s not Unix shell inspired at all, that’s the problem.

Oh it is, just in all the worst ways. I mean look at this: $value = 10 if ($value -eq 10) { Write-Host "Value is exactly 10." }

Perl users feel right at home.

Re: Sudo for Windows

#233

Earlier quoted context omitted.

Powershell is a terrible "language". It's fine for sysadmins to do sysadmin work but why would you want to subject business analysts to that level of unix shell inspired weirdness. Microsoft already has VB.NET which would serve that market much better. Give me C# over PS any day.

It’s not Unix shell inspired at all, that’s the problem.

That is actually an advantage.

Re: Sudo for Windows

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

Legally, FreeBSD is just an imitation of Unix.

Linux is just as much of a Unix as any OS in actual widespread use.

Re: Sudo for Windows

#235

Earlier quoted context omitted.

I don't think you should be downvoted for answering parent's question. It's helpful for understanding a mindset that not everyone possesses. Which version of Windows do you currently run, and what do you feel Windows has or does that makes it superior for your development work?

I run Windows 11. It has first-class support for Linux, with WSL, and the Windows Environment has first-class support for NVIDA graphics, popular productivity and entertainment software. It's reliable, stable, and performs well, with commercial support and scheduled major and minor updates. It's consistant. I can develop software for Windows 11 and be sure that everyone else with Windows 11 can run it.

Windows 11 has ads in its file manager, right?

Re: Sudo for Windows

#236

Earlier quoted context omitted.

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

winget has Python 3.12.2 at the moment, which has been released two days ago. And you don't have to use --id - you can do `winget install 7zip` etc in cases where there's no ambiguity.

It doesn't turn up here, maybe I'm on the wrong website? https://winget.run/search?query=python%203.12. For that matter 7zip doesn't show up in that search either.

I was able to find the 7zip page by googling for it: https://winget.run/pkg/7zip/7zip

But as with Python the default suggestion is `winget install -e --id 7zip.7zip`. If I can just do `winget install 7zip`, why can't they show that command? Why is the complicated way the default and the simple, intuitive method optional and not easily discoverable?

There's lots of room for improvement.

Re: Sudo for Windows

#237

Earlier quoted context omitted.

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

> Nobody does what you describe. Counterpoint: I've never heard anyone do what you describe. Therefore no one does it, even though you've just described to me who does. What exactly is the threat in using a local admin account? I can't think of anything you could do that wouldn't show a UAC prompt. The entire point and purpose of UAC was to prevent malicious elevation without the user's knowledge. I'm really not sure…

Additional work for IT when people screw up their machine.

I have worked in companies where local admin accounts would be given temporarily for like one hour, after submitting a ticket with a reason.

This was partially automated via a desktop application.

Re: Sudo for Windows

#238

Earlier quoted context omitted.

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

"Nobody does what you describe" is a very... broad statement. I can tell you that "all devs are local admins" is indeed a very popular policy, and has been the case everywhere I worked in the past, oh, 20 years or so - including Microsoft itself.

Another one is local admin account is only temporarily assigned via tickets, with tracking tools every time one needs to log in as admin.

And on UNIX, I have worked plenty of times where no one gets root on the shared development servers, other than IT folks themselves.

Re: Sudo for Windows

#239

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.

This comment reminds me of the GIF of Michael Scott screaming 'NO GOD PLEASE NO'[1]. It also tells me that anyone who makes this comment has limited exposure to comparative kernel development. I've always said it, I'll say it now, and I'll say it in the future: the NT kernel is by far the best part of Windows, and it is in many ways superior to the Linux kernel. Furthermore, Windows ships with an absolute metric ton…

Those folks fail to understand that if that ever happens, it will be a macOS UNIX like experience, or Android/Linux, or ChromeOS/Linux, not a Stalmman's GNU/Linux one.

Re: Sudo for Windows

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

You are not the only one thinking so. There is already a thread on OpenBSD's tech@ taking swipes at the obvious naming collision:

https://marc.info/?l=openbsd-tech&m=170742832804260&w=2

Post reply on HN