Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

401–410 of 439 posts

Re: Sudo for Windows

#401

I guess this is a thing on Windows now. However at the moment, it seems to be a very insecure thing. But hey it's early days... I predict they'll eventually get it right 125 patch Tuesdays from now. https://fosstodon.org/@serghei@mastodon.social/1119009868252...

Happy to have the feedback! Most of those I've already fixed internally, there's just a 3-4 week delay between me checking in, and it flowing to Insiders.

For the other few things I missed: Very happy for the feedback! I've filed bugs and those'll be the first things I look at come Monday morning.

Re: Sudo for Windows

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

Great to see this on Windows! Hopefully this is much easier than using the runas command.

Any particular reason the source code for sudo.exe wasn’t able to be open sourced along with the announcement of this feature?

Re: Sudo for Windows

#403
post #254
post #227

Earlier quoted context omitted.

I live by a one step at a time philosophy. It's better to make some incremental progress here, now, and open the door for future progress in this space too. Just like the Terminal - what we're putting out here in the first versions is just the first thing we feel comfortable with people using. We've got lots of ideas for more things to add, just, one step at a time :)

I don't know why people are so negative on this project. I already know about gsudo and yet I was still happy to see an official solution! Even if it were to never evolve, not having to pull a third-party executable in is always nice.

Thanks :)

I'd say waking up today to all this... negativity? was kinda a bummer. We've been working hard on something that people (myself included) have been asking for _for years_.

Like, obviously, it's not perfect out of the gate. That's fine! It was a haul enough to ship this in any form. Now that it's out there, we can make more and more improvements. One step at a time.

Sometimes, I just need a break from the internet I guess.

Re: Sudo for Windows

#404
The new command is named “sudo” because customer feedback and because MUSCLE MEMORY:

I hear you! We thought about some of the options you’re calling out here. A lot of customers voiced having the muscle memory of doing similar flows on various operating systems was more important to them and that’s where we landed. I totally understand your perspective and I do really appreciate the feedback. I’m always trying to learn from people like you so I can help to build things that will make your life better.

From https://devblogs.microsoft.com/commandline/introducing-sudo-...

Re: Sudo for Windows

#405
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 there can be harm done when a re-implementation, especially a heavily divergent one, takes the name of an existing program. There's a reason OpenBSD introduced "doas" instead of calling their new thing "sudo".

Reminds me of when PowerShell decided to have "wget" and "curl" cmdlets that didn't have any of the advanced features of the originals. Naively it sounds helpful. But it introduces confusion.

Re: Sudo for Windows

#406

Earlier quoted context omitted.

The onus isn't on me to disprove that 99% of cat users don't care about concatenation, but here's a non-comprehensive list of projects using cat to concatenate files: OpenSSL, Curl, Git, Linux, Gettext, NodeJS, zstd, GCC, FFmpeg, OpenJDK, Pyenv I think users, upstream developers, and downstream packagers of these software will all be upset if cat ceased to concatenate. Example: https://sourcegraph.com/search?q=contex…

Half of those examples from git don't even invoke cat, another quarter don't concatenate files, and the final quarter use it for preparing test data. Well, I guess the last is a valid use although again, most of those uses could've used printf "$chunk_of_data" >>output instead of writing temporary files all over the temp directory, and I imagine the "git am" test could've been written as "git am patch1 patch2" instea…

[deleted]

Re: Sudo for Windows

#407
post #133

Earlier quoted context omitted.

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?

lol, parent: "Microsoft is too dysfunctional to make a good product, be glad anyway"

me: "Why should we be glad that Microsoft is not functional enough to make a decent product...?"

HN: flag!

Re: Sudo for Windows

#408

Earlier quoted context omitted.

Why can't you do this with the tool that already exists to do the exact same thing, called runas?

I have noticed that runas is mentioned as an already existing sudo alternative, but as far as I know, runas asks you for the administrator's password. sudo asks the own user password. This is how you give a non administrator user the right to use some application/tool without revealing the admin's password. Or does runas work differently than I thought?

My question is more why they couldn't add this functionality into runas, rather than making a new tool that doesn't even do what its name says it does :)

Re: Sudo for Windows

#409
post #254
post #227

Earlier quoted context omitted.

I live by a one step at a time philosophy. It's better to make some incremental progress here, now, and open the door for future progress in this space too. Just like the Terminal - what we're putting out here in the first versions is just the first thing we feel comfortable with people using. We've got lots of ideas for more things to add, just, one step at a time :)

I don't know why people are so negative on this project. I already know about gsudo and yet I was still happy to see an official solution! Even if it were to never evolve, not having to pull a third-party executable in is always nice.

Because it isn't sudo. It's a marketing effort stealing the name of sudo for a completely different technology that is only tangentially related to sudo.

Re: Sudo for Windows

#410

Earlier quoted context omitted.

Half of those examples from git don't even invoke cat, another quarter don't concatenate files, and the final quarter use it for preparing test data. Well, I guess the last is a valid use although again, most of those uses could've used printf "$chunk_of_data" >>output instead of writing temporary files all over the temp directory, and I imagine the "git am" test could've been written as "git am patch1 patch2" instea…

> Half of those examples from git don't even invoke cat That's because it's a regex search and not relevant to the point at all. What matters is that people use widely advertised features of a popular tool, including sudo and cat. Especially if that feature is the single stated purpose of the tool. Taking a name of a widely used tool and slapping it on something that doesn't even do what the original was made for isn…

> "git am" test could've been written as "git am patch1 patch2" instead

This is off topic, but the Git devs were correct in doing `cat pine patch1 | git am`, since the test in question is

    test_expect_success 'am takes patches from a Pine mailbox'
The test requires the mailbox not be split in two, so `git am pine patch1` is out of the question. patch1 is reused across multiple tests, so it makes sense for it to be in separate files. Concatenating is the logical conclusion.

    cat patch1 >> pine
    git am pine
is possible, but why? It's more code and it mutates the contents of files after initial creation, making the tests as a whole slightly harder to reason about.
Post reply on HN