Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

261–270 of 439 posts

Re: Sudo for Windows

#261
Here's hoping that "Windows 12" will be just a Window manager + Desktop running on Linux, with all existing bugs meticulously replicated to maintain backwards compatibility with Windows 95/7/8/10/11.

Re: Sudo for Windows

#262

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?

You're right, but on my work environment I have two accounts - "me" and "me with elevated permissions". (I don't say "admin" because there's still a bunch of stuff I can't do, like run netsh). I assumed that was the normal pattern in Windows-land?

Re: Sudo for Windows

#263
Windows tries to improve the developer experience… why not call it wudo or something funny since devex on windows is obviously a joke.

Re: Sudo for Windows

#264

Earlier quoted context omitted.

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

Also 'start -Verb runas' in Powershell.

I really hope that sudo is going to allow one to capture the output of the thing running in sudo and handle errors better. I recently wrote an installer script in PowerShell and had to go through severe contortions to support privilege elevations for only a minimal part of the script. I needed to use start with runas to relaunch the same script with different options to continue the installation process and there's not much in the way of proper error handling either.

Re: Sudo for Windows

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

The real question is, where will incidents be reported to if you're not in the sudoers file?

Re: Sudo for Windows

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

The real question is, where will incidents be reported to if you're not in the sudoers file?

The people demand to know.

Re: Sudo for Windows

#267
post #164

Earlier quoted context omitted.

This doesn't mean this isn't an issue, and that the issue should be worsened. Of course, it being an issue is an opinion (of mine), see my daniel.haxx.se link from my other comment next to yours for a motivation of this opinion.

Either way it’s done it’s an issue. Use a new name and it becomes a training problem, even for the most basic usage. Make it the same name and people expecting certain behaviors might get something slightly different. At a basic level, I’d wager a vast majority of sudo’s usage is very basic, “run this command as admin”. If it can do that out of the box, it solves for a vast majority of users and they don’t have to le…

This can't fully address the concern I raised. Their curl alias addressed the most basic / common usage and it caused issues.

I also can't imagine a different name to cause such a training issue. We are speaking about people who learned using the terminal on Unix and are using it on Windows. They are likely at ease with computers. If they are confused by a name change, I can't imagine how confused they could be at the first difference they encounter. The same name might as well cause more training issues. I'm not convinced.

Re: Sudo for Windows

#268
post #196
post #149

Earlier quoted context omitted.

Look, I'm genuinely curious and we happen to have a MS dev here who could provide interesting first hand insight. I'm not critical. I don't have enough knowledge on the situation to share criticism on the topic yet. I could have added "Could you expand on this?" to clarify my intent.

To answer the original question: I've been at MSFT like, 8 years now? And this is probably the third serious attempt my team has made at Sudo for Windows. (I think I heard of a couple other attempts in my tenure as well). After the last attempt, my mantra had always been "this is impossible to actually ship". It's a tricky feature to ship, cause it is ultimately something that can be used as an escalation of privileg…

Pretty fair, especially since there's already tons of ways (albeit far less convenient) to accomplish nonmalicious escalation.

Great work making this happen!

Re: Sudo for Windows

#269
post #196
post #149

Earlier quoted context omitted.

Look, I'm genuinely curious and we happen to have a MS dev here who could provide interesting first hand insight. I'm not critical. I don't have enough knowledge on the situation to share criticism on the topic yet. I could have added "Could you expand on this?" to clarify my intent.

To answer the original question: I've been at MSFT like, 8 years now? And this is probably the third serious attempt my team has made at Sudo for Windows. (I think I heard of a couple other attempts in my tenure as well). After the last attempt, my mantra had always been "this is impossible to actually ship". It's a tricky feature to ship, cause it is ultimately something that can be used as an escalation of privileg…

Makes sense.

Thanks for taking the time to answer, very appreciated! You must be happy to have been wrong, ah ah.

Re: Sudo for Windows

#270

Side note that I've always found interesting: sudo is almost entirely maintained by one dude: https://github.com/sudo-project/sudo/graphs/contributors

Wow. I thought sudo was maintained by kernel devs. Kudos to the maintainer tho
Post reply on HN