Comments (9)
I added a config setting, that when toggled will ensure gsudo path appears first in the PATH in #353.
It's currently named PathPrecedence
Alternatively, I could name the config option something like EnsureSudoAlias
or similar.., But subjectively, the PathPrecedence sounds more explicit. Opinions before this is released?
I believe that overriding Ms-Sudo should NOT be the default, An opt-in is preferrable. Scripts or people may want to use sudo
for ms-sudo, and gsudo
for this one.
In #354, I've added a brief description to gsudo config
Next goal, make gsudo arguments compatible with 24H2
ms-sudo.
from gsudo.
Just starting the convo...I also assume Windows is using the same techniques as gsudo? I wonder if there are any exposed APIs that could be leveraged in gsudo?
Microsoft is not using any new Api's, at least yet, which makes it similar to gsudo, and also backwards compatible to win 10. Already documented here. Microsft sudo vs Gsudo.
Basically winsudo
or ms-sudo
(how do we name it at least in our conversations?) is same as gsudo
in Attached Mode plus forwarding of the handles, which resolves some drawbacks I had with that mode.
After watching the YouTube video, it seems like it is only for a process and you can't pass pure
powershell
to it likegsudo
.
Implementing that one is a one way road. Once implemented, then the users will expect winsudo
to accomodate to any shell, and microsoft will never do that. My opinion is that it should be PowerShell who should provide that syntax goodie, not sudo.exe
or gsudo.exe
. That would make it also work it Linux, with the real sudo.
The name clash is a bummer. They should have made there binary
wsudo
or the like. From reading the comments, their customers wanted the muscle memory.
I can't blame them on that one. But... their customers are gsudo users plus... or people who hasn't discovered gsudo yet. I think gsudo helped break the mental barrier that prevented microsoft from implementing it.
The one feature that stood out was a mode that would disable the standard-in of the elevated process. Does
gsudo
have this or is the standard-in always open on the elevated process?
I implemented it two years ago. It is documented here. The naming is not really catchy: gsudo config SecurityEnforceUacIsolation true
. Not sure if a single soul used it, since no-one ever mentioned it to me, so I didn't invest more time in it. And I am not Microsoft, so I couldn't embed telemetry (people will have valid reasons to hate an elevated app with telemetry) which means that I don't know if anyone uses it. Happy that Microsoft also implemented it, kinda gave some value that the idea was worth it.
Let's talk actionable items:
- Regarding the name clash, I wouldn't make gsudo overwrite an OS command by default. Maybe add an easy opt-in way to force gsudo's sudo alias?
- Also, let's ensure
gsudo
accepts input parameters inwinsudo
format. I was waiting forwinsudo
to stabilize before starting this.
from gsudo.
Alternatively, I could name the config option something like
EnsureSudoAlias
or similar.., But subjectively, the PathPrecedence sounds more explicit. Opinions before this is released?
Yeah, i think PathPrecedence is more accurate to what it does.
I believe that overriding Ms-Sudo should NOT be the default, An opt-in is preferrable. Scripts or people may want to use
sudo
for ms-sudo, andgsudo
for this one.
Ye. while i prefer gsudo i just opted to not mess with ms-sudo for now.
Next goal, make gsudo arguments compatible with
24H2
ms-sudo.
Thanks for being one step ahead of these kind of changes, and for making gsudo, been using it already for 3 years
from gsudo.
v2.5.0 is out. Anything else to address, or any other idea?
from gsudo.
After watching the YouTube video, it seems like it is only for a process and you can't pass pure powershell
to it like gsudo
. The name clash is a bummer. They should have made there binary wsudo
or the like. From reading the comments, their customers wanted the muscle memory.
The one feature that stood out was a mode that would disable the standard-in of the elevated process. Does gsudo
have this or is the standard-in always open on the elevated process?
from gsudo.
Just starting the convo...I also assume Windows is using the same techniques as gsudo? I wonder if there are any exposed APIs that could be leveraged in gsudo?
Microsoft is not using any new Api's, at least yet, which makes it similar to gsudo, and also backwards compatible to win 10. Already documented here. Microsft sudo vs Gsudo.
Basically
winsudo
orms-sudo
(how do we name it at least in our conversations?) is same asgsudo
in Attached Mode plus forwarding of the handles, which resolves some drawbacks I had with that mode.After watching the YouTube video, it seems like it is only for a process and you can't pass pure
powershell
to it likegsudo
.Implementing that one is a one way road. Once implemented, then the users will expect
winsudo
to accomodate to any shell, and microsoft will never do that. My opinion is that it should be PowerShell who should provide that syntax goodie, notsudo.exe
orgsudo.exe
. That would make it also work it Linux, with the real sudo.The name clash is a bummer. They should have made there binary
wsudo
or the like. From reading the comments, their customers wanted the muscle memory.I can't blame them on that one. But... their customers are gsudo users plus... or people who hasn't discovered gsudo yet. I think gsudo helped break the mental barrier that prevented microsoft from implementing it.
The one feature that stood out was a mode that would disable the standard-in of the elevated process. Does
gsudo
have this or is the standard-in always open on the elevated process?I implemented it two years ago. It is documented here. The naming is not really catchy:
gsudo config SecurityEnforceUacIsolation true
. Not sure if a single soul used it, since no-one ever mentioned it to me, so I didn't invest more time in it. And I am not Microsoft, so I couldn't embed telemetry (people will have valid reasons to hate an elevated app with telemetry) which means that I don't know if anyone uses it. Happy that Microsoft also implemented it, kinda gave some value that the idea was worth it.Let's talk actionable items:
- Regarding the name clash, I wouldn't make gsudo overwrite an OS command by default. Maybe add an easy opt-in way to force gsudo's sudo alias?
- Also, let's ensure
gsudo
accepts input parameters inwinsudo
format. I was waiting forwinsudo
to stabilize before starting this.
I think adding an option to keep the "sudo" alias is a good and high-priority item.
from gsudo.
Pre-Release available:
https://github.com/gerardog/gsudo/releases/tag/v2.5.0
from gsudo.
Related Issues (20)
- Issue: Multiple simultaneous gsudo versions throw "Unauthorized. (Different gsudo.exe?)"
- Feature Request: Make sudo more powerful HOT 1
- Issue: Nano and vim executables get stuck when opened with gsudo on cmd HOT 5
- Issue: gsudo: "Error: Invalid option: -noninteractive". The gsudo scriptblocks also fail. HOT 5
- Feature Request: Add '#' to lines in elevated shell process? (to mimic Linux) HOT 2
- Issue: System.NullReferenceException thrown at gsudo start HOT 1
- Issue: Wrong SID when using cached token HOT 1
- Issue: Running gsudo from a desktop shortcut flashes a console window quickly HOT 7
- Issue: sudo alias (sudo !!) throws a ParseError exception and doesn't elevate the last executed command in PowerShell Core HOT 3
- Feature Request: Give users a lecture when they use gsudo. HOT 5
- Error: `System.InvalidOperationException: No process is associated with this object` when using gsudo with Admin by Request HOT 2
- WSL wrapper will not work if gsudo is on different drive
- Issue: `gsudo` script fails missing `gsudo.exe` in MSYS env HOT 2
- Error: `ParentContainsErrorRecordException` when using `gsudo { Get-NetIPAddress }` HOT 4
- Issue: Sophos AV blocks gsudo
- Issue: caching with `CacheMode = "Auto"` expires too soon in MSYS2 and Cygwin HOT 7
- Commands with Bool ($True/$False) Paramiters do not run within a gsudo session HOT 5
- Feature Request: Add application manifest HOT 2
- Issue: Can run Nano with sudo/gsudo HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsudo.