Comments (2)
Yes, the elevated and non-elevated apps are actually running in isolated logon sessions, with isolated network connections each. Therefore UNC paths (\\server\share\file
) may not be accesible if the elevated session doesn't inherit access or has cached credentials for that share.
Also, mapped drives are no longer resolvable from the elevated session, for instance: If you run gsudo
and your current directory is a mapped drive like Z:
when elevated the Z:
drive no longer points us to a valid \\server\share\file
path.
This two issues breaks two things:
- One anti-tampering gsudo protection method.
- The current directory may be invalid on the elevated session, so many commands will refuse to run.
So, this issue is non trivial to solve and has ramifications.
Nonetheless, I've managed to make some fix that allows to use gsudo from a mapped or network drive as long as the current directory is NOT a network drive.
For example the following cases are working on my machine after some fixing
C:\> Z:\utils\gsudo.exe netsh interface ipv4 set ...
C:\> \\server\share\gsudo netsh interface ipv4 set ...
(please note the current directory is C:, not z: )
You can preview the fix from this UNSTABLE, unsigned build)
Another workaround would be to copy gsudo
to a local folder first...
As a sidenote, you may want to omit the --piped
argument and let gsudo decide which mode to use.
from gsudo.
I've done some tests with v0.7 and, in my extremely limited network/scenario, looks like it's working.
I appreciate anyone who can jump in and let me know if this is still and issue.
Thanks.-
from gsudo.
Related Issues (20)
- Feature Request: non-uac per-user installer for winget HOT 9
- Issue: UAC keeps popping up HOT 2
- Issue: Installer should drop module to %ProgramFiles%\WindowsPowerShell\Modules, not %ProgramFiles%\PowerShell\Modules HOT 2
- Issue: Unhandled Exception when using gsudo on Powershell 7.3.6 HOT 4
- Issue: scoop global install reports failure HOT 2
- Feature Request: Unelevate Console HOT 3
- Win32 internal error "Access is denied" 0x5 occurred while reading the console output buffer HOT 4
- Issue: gsudo --ti timeouts to `Error: Unable to connect to the elevated service` HOT 6
- Feature Request: sudoers (run as someone who's password I don't know) HOT 2
- Issue: Having spaces in the parameters of kopia.exe will cause an error HOT 7
- README: Manually: Unzip the latest release, and add to the path. HOT 4
- Issue: Incorrect quote handling on PowerShell>=v7.3 when sudo'ing without `{}` HOT 3
- Feature Request: Root-Like Mode (unsecure mode) HOT 3
- 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
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.