13 ms·
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
by zadjii 3y ago
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 now and I'm pretty excited to talk about it or answer any questions!
- litheon 3y agoGreat 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?
- SushiHippie 3y agoCan you share if this will ever come to Windows 10, or will it be a Windows 11+ exclusive thing?
- starik36 3y agoSame here. Would love it on Windows 10 and Windows Server 2016+.
- blactuary 3y agoMy left leg for Windows Terminal on Server 2016
- vidanay 3y agoI'm not even sure Win11 is on my company roadmap, much less anything cutting edge like an insiders release. Windows 10 Enterprise compatibility is pretty much required for widespread adoption of Sudo for Windows.
- pixel16 3y agoWindows 10 is EOl next year. I would bet your company has plans to move to 11 at some point in the near future. I work with customers daily to help to move to 11
- FirmwareBurner 3y ago> I work with customers daily to help to move to 11 What issues are your customers having that they need profesional help to upgrade to a new Windows OS?
- Sakos 3y agoIs this a serious question?
- FirmwareBurner 3y agoDid I stutter?
- Sakos 3y agoApparently, because you can't seriously be asking that question. You've clearly never worked in any kind of customer support position, because businesses and individuals need all kinds of help with a transition like that.
- FirmwareBurner 3y ago>Apparently, because you can't seriously be asking that question. YEs I was asking seriously. You still haven't explained what those challenges could be. All you do is mock people for their genuine questions without providing any actual answers/information to back up your vage statements. >You've clearly never worked in any kind of customer support position Then if that's clear for you I haven't never done that, why would you not understand I was being serious? Why are you being disingenuous here? Or you just enjoy being a troll? > because businesses and individuals need all kinds of help with a transition like that. Mate, 12 year-olds in my developing country can run Windows 11 updates/installs for you, including installing pirated licenses and cracks for you if you pay them 5 bucks. What could be so complicated that the internal IT of a company can't figure out the transition from Windows 10 to 11 that they need to pay outside help for that? Especially that backwards compatibility is one of Microsoft's fortes to make life easier for admins and convince companies to stay in their ecosystem.
- zadjii 3y agoAlready working on it :) You can follow https://github.com/microsoft/sudo/issues/2 https://github.com/microsoft/sudo/issues/2 for updates. Honestly, the hardest part will be porting the Settings app changes to the Windows 10 styles. `sudo.exe` itself doesn't really depend on any OS platform changes, and if it did, we'd have a _very_ compelling case to bring those features with us downlevel.
- starik36 3y agoWhere exactly is sudo.exe? It doesn't appear to be in the repo. I don't need the Settings portion. The exe itself would be immensely useful.
- ktpsns 3y agoNice 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 love to see a tighter integration of winget into Windows. I recently used a fresh MS Windows Server 2023 installation and had a bad day to even get winget installed. I really hope that the current strategy does not turn out as somewhere between "embrace" and "extend"...
- zadjii 3y agoThanks! I think the team we're on has a very clear focus on making developers happy. Like, we're all ourselves, developers, so a lot of it is very self-serving. Anything we can do to make our own lives better is probably going to be a good thing for a lot of other developers too.
- mixmastamyk 3y agoShame the rest of the company is dedicated to making users unhappy to scrounge a few extra pennies. Users include developers of course. (See the transcript of Security Now 958 for recent details.)
- yndoendo 3y agoWindows change is welcoming, yet still not quality. As stated by someone below, sudo is https://www.sudo.ws/ https://www.sudo.ws/. Microsoft should give it a proper distinctive name lie wsudo or psudo. Little thinks like is compounds the issues with Windows / Microsoft. Even continually sticking to old design patterns causes issues in development and deployment. Big name companies do not trust applications running on hosted Windows because of their current business practices. Microsoft does not even have a means to provided ease of deployment for air-gap system. This is the only way some big business will let products hosted on Windows to be in their facilities. Windows as become more problematic for me because of all the layers of security that need to be applied for companies to trust Windows. This causes issues such as having to stop typing because Visual Studios or VSCode cannot process key strokes in real time. Localization translation text standard still does not allow for containing singular and plural in the same key. Translations should be easily to update so the client can improve wording on the fly. Microsoft still recommends using resx and compiling a DLL. .....
- deleted 3y ago[deleted]
- mappu 3y agoDoes the UAC prompt always say "Verified publisher: Microsoft"? Even without controlling stdin, malware at medium integrity could prompt to run a malicious command, and users will only see Microsoft's good name in the popup. Does this elevate within your own account token (i.e. will not work for non-Administrator users), or does it actually switch user (e.g. to LOCAL SYSTEM)?
- dist-epoch 3y agoPutting Microsoft in the UAC prompt is indeed weird. It should be the info of the target binary. This feature sounds a bit rushed, and it's early preview, maybe they fix it by the final release.
- zadjii 3y agoYea, that's a limitation of UAC at this point, and probably not one we can avoid. The "Show details" dropdown on the dialog does however show the commandline you requested, so at least that's one way of making sure it's the thing you ran
- SushiHippie 3y agoThe best way would be, if it could say something like: Allow $PARENT_PROCESS_NAME to run $COMMAND with administrator rights. So if you would enter the following in cmd.exe: sudo notepad.exe ... It would say: Allow Command Processor Shell to run notepad.exe ... with administrator rights.
- vimsee 3y ago> ..there's enough that's different about the permissions structure between OS's that just a straight port wouldn't make sense. Does this mean that the feature set of sudo for Windows can't be similar to the feature set found on sudo for *nix e.g. for BSD, MacOS, Linux..?
- Joker_vD 3y agoDoes sudo supports ACLs (which are the basis of Windows security model)?
- darksfall 3y ago[flagged]
- dijit 3y agothat’s rude and unfair. I really dislike windows but there’s a decent amount of good stuff in there. it’s just buried under the popups, ads, strange behavior and terrible business practices that are hostile to interop. This helps change that b IOCP is dope.
- neurostimulant 3y agoI 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.
- Springtime 3y ago> especially if it doesn't have the same behavior as unix sudo... imagine the confusion of unsuspecting users searching how to use sudo in the future. It's hard to imagine a company that size would name it so deliberately without realizing it would cause confusion in search engine results and such. A good faith assumption would be they wanted to make Windows more familiar to users of both but it also means that Windows will get mentioned in more Linux results over time to disambiguate it.
- timnetworks 3y ago>It's hard to imagine a company that size would name it so deliberately without realizing it would cause confusion in search engine results and such. same microsoft as where I'm from?
- herbst 3y agoSo it's just some black hat SEO to seem more relevant to Linux users?
- blibble 3y agothat's the standard microsoft way embrace (copy sudo), extend (add incompatible options), extinguish
- Anon1096 3y agoI can say with 100% certainty that Microsoft is not going to extinguish sudo
- 3y ago
- NikkiA 3y agoI've been using the 'sudo' that scoop offers for a while, and it has always done exactly what I wanted and completely removed the hassle of having to open a new cmd/powershell with 'run as administrator'. Plus it means I don't have to leave the comfort of Tabby.
- earthwalker99 3y agoBack when I used scoop, I uninstalled that right away because I didn't like how scoop installed it on its own.
- VagabundoP 3y agoha, thank you! I don't need it often but I have cursed for the want of it in Windows powershell.
- Repulsion9513 3y agoWhy can't you do this with the tool that already exists to do the exact same thing, called runas?
- debugnik 3y agoAlso 'start -Verb runas' in Powershell.
- westurner 3y agoIs there anything shorter than `powershell.exe -executionpolicy unrestricted -file`? powershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages setup_windows.ps1: https://github.com/westurner/dotfiles/blob/develop/scripts/setup_windows.ps1 https://github.com/westurner/dotfiles/blob/develop/scripts/s...
- jve 3y agoThe executionpolicy merely allows you to write unsigned scripts. Not that it runs them elevated.
- jodrellblank 3y agopowershell.exe -executionpolicy unrestricted -file ./setup_windows.ps1 -InstallPSWindowsUpdate -UpdateWindows -UpdateChocoPackages powershell -ex bypass -f ./setup_windows.ps1 -I -UpdateW -UpdateC (or whatever are short enough to uniquely identify parameter names for your script)
- westurner 3y agoThx
- janosdebugs 3y agoI 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.
- tiff_seattle 3y agoDoes this mean that I can run PSWindowsUpdate in a remote PowerShell session? If so, this is going to save me a lot of time. Also, AD management tools never work vie Enter-PSSession. Will stuff like that work as well?
- ocdtrekkie 3y agoI haven't seen anyone ask the important question: Is the mascot coming along for the ride? https://www.reddit.com/r/linuxmasterrace/comments/u4xeoy/in_case_you_didnt_know_sudo_has_its_own_logo/ https://www.reddit.com/r/linuxmasterrace/comments/u4xeoy/in_...
- dmead 3y agoWhy don't you guys just use a regular shell? People just want a unix like command line. Windows seems to be doing a lot of work to avoid this.
- 29athrowaway 3y agosudo (1980) is older than Linux (1991). I am not asking questions about sudo to someone assuming sudo is specifically Linux software.
- Affric 3y agoI 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?
- JaggedJax 3y agoThe real question is, where will incidents be reported to if you're not in the sudoers file?
- rezonant 3y agoThe people demand to know.
- teekert 3y agoSo harsh right? I felt bad the first couple of times even if it was my own computer!
- SLWW 3y agoI still to this day feel like I'm being snitched on, even if I own the hardware directly. Probably some MS server =|
- DANmode 3y agoThey collect and send the filenames on your disk, and other arbitrary stuff. Why not?!
- numpad0 3y agoYou'll be asked to enable .NET and Simple TCPIP services, and a mailbox file created under C:\ will open on Notepad every logins thereafter.
- Pikamander2 3y agoSanta Claus, if XKCD is to be believed https://xkcd.com/838/ https://xkcd.com/838/
- codetrotter 3y agobillg@microsoft.com
- easyThrowaway 3y agoThe boring answer would be the event viewer snap-in. Alternatively, a stern yet extremely polite mail from Raymond Chen asking what you were actually trying to accomplish.
- stuaxo 3y agoThis is good, while I know RunAS exists, I'm more likely to run another terminal with admin than learn how to use it, if sudo is there I'll use that. Every little bit of friction removed is a good thing.
- hatenberg 3y agodidn't runas exist for ages?
- bArray 3y agoIt seems interesting to me that Windows integrates more and more elements of Unix. Linux is open source and free, Apple develop an OS that sells specific hardware, and historically Windows has sold the software for generic hardware. Windows is unlikely to become a better Linux than Linux. Where is Microsoft's new business model going? Historically Office was a money maker, but Office online is a shambles and many users interact with Office via this interface - I see Office slowly dying in favour of open source options. I see Windows licenses being sold less and less in the future. Microsoft Lens is essentially buried at this point. There are the Surface laptops/tablets which are good but not special. Dedicated games console hardware will likely become less attractive as they slowly become glorified desktop PCs. I don't see Microsoft with big user shares in the software or hardware industries? There were a few good purchases such as Minecraft, GitHub (+), etc [1]. Is there something I'm missing? [1] https://en.wikipedia.org/wiki/List_of_mergers_and_acquisitions_by_Microsoft#Acquisitions https://en.wikipedia.org/wiki/List_of_mergers_and_acquisitio... (+) GitHub's new security model is outright hostile - to the point I no longer want to use it.
- jodrellblank 3y agoWhat?? "Microsoft revenue was $198 billion in 2022, up $30.2bn (+18%) from a year earlier. When we do a breakdown by product streams, the largest source of Microsoft’s revenue was Office, with $44.9 billion (23% of the total). Just behind in the second place was Azure with $44bn of revenue (22% of total)." - https://www.kamilfranek.com/microsoft-revenue-breakdown/ https://www.kamilfranek.com/microsoft-revenue-breakdown/ Office alone increasing by $5Bn revenue in a year, increasing by $24Bn in ~3 years, being the largest chunk of revenue of the most valuable market-cap company on the planet, that's what counts as "slowly dying"??
- jaylittle 3y agoIsn't running commands as admin, in the same terminal window, already possible via the use of runas.exe? Granted I haven't daily driven Windows in years but IIRC that does the job albeit with clunkier syntax.
- WorldMaker 3y agorunas doesn't support "same terminal window", it always has launched a new window. It's possible this sudo could have been implement as yet more clunky flags to runas, but it seems like making it a separate tool has benefits: off by default, whereas runas is a nearly always-on required built-in; more importantly a nicer less clunky syntax.
- ElMocambo_x4 3y agoWhat are the common points with Linux, and the differences?
- Xelbair 3y agothe real question is... isn't it pointless if you still get UAC prompt and cannot just log in via CLI? and what's the point of switching when gsudo basically does the same?
- nimbius 3y agoi guess id say thanks for all your hard work, but i dont use windows. exactly how is 'sudo for windows' different than the existing model in windows 10 where privilege elevation is a popup window and you click through it? arguably the current model is just sudo with nopasswd. how do you reconcile the idea that your effort --without principled reform of the windows security model at a fundamental level-- is just cargo-culting a more successful projects security model? 'Start-Process powershell -Verb runAs' is the same or different than this? Thanks for caring about security and trying to make things better. its hard, thankless and frustrating (and thats just the windows part ;))
- HeavyStorm 3y agoscoop install sudo. Sorry, this has been lacking for so long that you know... Late to the party.
- asveikau 3y agoI 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.