Live data from Hacker News

Sudo for Windows

devblogs.microsoft.com

251–260 of 439 posts

Re: Sudo for Windows

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

sudo (1980) is older than Linux (1991).

I am not asking questions about sudo to someone assuming sudo is specifically Linux software.

Re: Sudo for Windows

#253
post #223

Earlier quoted context omitted.

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

Does it have a policy editor comparable to the /etc/sudoers file? Sudo is interesting not because it just allows to assume admin privileges for a moment; it allows to give access in a finely-grained manner, and not exclusively admin access. Just scrolling through the documentation [1] gives some idea. Examples in the end may surprise the reader with the variety of capabilities. [1]: https://www.man7.org/linux/man-pag…

You're talking about Sudo for Linux - today's new "Sudo for Windows" doesn't support a sudoers file.

Re: Sudo for Windows

#254
post #227

Earlier quoted context omitted.

There are several ways to do sudo for Windows already, to the extent this program does sudo for Windows. In other words, you're not actually solving the reason people are asking you for sudo for Windows. How do I configure my sudoers policy to allow someone to run a specific application (and only that application) through sudo? THAT is the magic of sudo. Sudo is not just "use your own password for root" like you seem…

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.

Re: Sudo for Windows

#255
post #223

Earlier quoted context omitted.

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

Does it have a policy editor comparable to the /etc/sudoers file? Sudo is interesting not because it just allows to assume admin privileges for a moment; it allows to give access in a finely-grained manner, and not exclusively admin access. Just scrolling through the documentation [1] gives some idea. Examples in the end may surprise the reader with the variety of capabilities. [1]: https://www.man7.org/linux/man-pag…

This sudo for Windows doesn't either because it's not sudo. Looking at the docs, it's not even remotely compatible either. The choice of name here is unfortunate.

Re: Sudo for Windows

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

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?

Re: Sudo for Windows

#257
post #253
post #223

Earlier quoted context omitted.

Does it have a policy editor comparable to the /etc/sudoers file? Sudo is interesting not because it just allows to assume admin privileges for a moment; it allows to give access in a finely-grained manner, and not exclusively admin access. Just scrolling through the documentation [1] gives some idea. Examples in the end may surprise the reader with the variety of capabilities. [1]: https://www.man7.org/linux/man-pag…

You're talking about Sudo for Linux - today's new "Sudo for Windows" doesn't support a sudoers file.

No, nine_k is talking about the abstract requirements that are understood by "sudo", asking how they are reflected in this implementation.

Sudo is widely understood to refer to a program which allows specific users to run specific privileged commands.

Re: Sudo for Windows

#258
post #164

Earlier quoted context omitted.

Windows and Linux already share dozens of commandline commands with the same name and have different behaviors.

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 learn some kind of new cmdlet to be able to do it.

Re: Sudo for Windows

#259

Considering the way PowerShell commands go, I assume this will be: RunWithAllTheElevatedPermissionsPossible --YesEvenThose .\inthisfolder.folder\. grep : The term 'grep' is not recognized....

It's evident that you haven't used PowerShell. Almost all commands in PowerShell have short aliases. For instance, instead of typing 'Get-ChildItem', you can simply use 'gci', which stands for the first letters of each word. Unlike Bash and other shells, where you must learn various Domain-Specific Languages (DSLs) to handle XML, JSON, YAML, etc., PowerShell allows you to use its native language to work with any data type. This is because PowerShell operates on objects rather than plain text. Therefore, PowerShell is significantly more advanced than other shells.

Re: Sudo for Windows

#260
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 am a Linux user but am interested in the architectural decisions you have made. I use doas and I know there are other alternatives.

When coming up with your sudo what were your inspirations and what does sudo do that you decided you wanted to avoid?

Post reply on HN