Downloads:
447,510
Downloads of v 1.0.1:
4,263
Last Update:
07 Aug 2021
Package Maintainer(s):
Software Author(s):
- Gerardo Grignoli
Tags:
sudo for windows run elevated user command runas powershell wsl- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
gsudo - a sudo for windows
This is not the latest version of gsudo - a sudo for windows available.
- 1
- 2
- 3
1.0.1 | Updated: 07 Aug 2021
- Software Specific:
- Software Site
- Software Source
- Software License
- Software Docs
- Software Issues
- Package Specific:
- Package Source
- Package outdated?
- Package broken?
- Contact Maintainers
- Contact Site Admins
- Software Vendor?
- Report Abuse
- Download
Downloads:
447,510
Downloads of v 1.0.1:
4,263
Maintainer(s):
Software Author(s):
- Gerardo Grignoli
gsudo - a sudo for windows 1.0.1
This is not the latest version of gsudo - a sudo for windows available.
Legal Disclaimer: Neither this package nor Chocolatey Software, Inc. are affiliated with or endorsed by Gerardo Grignoli. The inclusion of Gerardo Grignoli trademark(s), if any, upon this webpage is solely to identify Gerardo Grignoli goods or services and not for commercial purposes.
- 1
- 2
- 3
All Checks are Passing
3 Passing Tests
Deployment Method: Individual Install, Upgrade, & Uninstall
To install gsudo - a sudo for windows, run the following command from the command line or from PowerShell:
To upgrade gsudo - a sudo for windows, run the following command from the command line or from PowerShell:
To uninstall gsudo - a sudo for windows, run the following command from the command line or from PowerShell:
Deployment Method:
This applies to both open source and commercial editions of Chocolatey.
1. Enter Your Internal Repository Url
(this should look similar to https://community.chocolatey.org/api/v2/)
2. Setup Your Environment
1. Ensure you are set for organizational deployment
Please see the organizational deployment guide
2. Get the package into your environment
Option 1: Cached Package (Unreliable, Requires Internet - Same As Community)-
Open Source or Commercial:
- Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://community.chocolatey.org/api/v2/. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
- You can also just download the package and push it to a repository Download
-
Open Source
-
Download the package:
Download - Follow manual internalization instructions
-
-
Package Internalizer (C4B)
-
Run: (additional options)
choco download gsudo --internalize --version=1.0.1 --source=https://community.chocolatey.org/api/v2/
-
For package and dependencies run:
choco push --source="'INTERNAL REPO URL'"
- Automate package internalization
-
Run: (additional options)
3. Copy Your Script
choco upgrade gsudo -y --source="'INTERNAL REPO URL'" --version="'1.0.1'" [other options]
See options you can pass to upgrade.
See best practices for scripting.
Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.
If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:
choco upgrade gsudo -y --source="'INTERNAL REPO URL'" --version="'1.0.1'"
$exitCode = $LASTEXITCODE
Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
Exit 0
}
Exit $exitCode
- name: Install gsudo
win_chocolatey:
name: gsudo
version: '1.0.1'
source: INTERNAL REPO URL
state: present
See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.
chocolatey_package 'gsudo' do
action :install
source 'INTERNAL REPO URL'
version '1.0.1'
end
See docs at https://docs.chef.io/resource_chocolatey_package.html.
cChocoPackageInstaller gsudo
{
Name = "gsudo"
Version = "1.0.1"
Source = "INTERNAL REPO URL"
}
Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.
package { 'gsudo':
ensure => '1.0.1',
provider => 'chocolatey',
source => 'INTERNAL REPO URL',
}
Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.
4. If applicable - Chocolatey configuration/installation
See infrastructure management matrix for Chocolatey configuration elements and examples.
This package was approved as a trusted package on 14 Aug 2021.
gsudo
allows to run commands with elevated permissions within the current console.
It is a sudo
equivalent for Windows, with a similar user-experience as the original *nix sudo.
Elevated commands are shown in the caller (non-elevated) console, no switching to another console required.
http://github.com/gerardog/gsudo
Usage
gsudo [command] [arguments]
Executes the specified command, elevated, and returns.
Examples
gsudo notepad c:\Windows\System32\drivers\etc\hosts
gsudo cmd
md5: D500845AD4D877648469CE453B1B6D4C | sha1: E04C84C20BFCF223F0BE4BFDDB7413B7F7E9F103 | sha256: 26BAF4D9441DBCD669D840DCC97A905E3C1D1218819B36DB7CF9198D1FFB081D | sha512: 699F17DE97A78D708851B44DC5F5855F6519CDEB1AE30511E3CE5501E05937777DCB429940BF63C936219534BBA671C30DE972B8666BB3B9CBFF0469B4F04568
# PowerShell Shim: Exists only to prevent PowerShell from running "gsudo" bash script.
if($myinvocation.expectingInput)
{ $input | & gsudo.exe @args }
else
{ & gsudo.exe @args }
$ErrorActionPreference = "SilentlyContinue"
$running = Get-Process gsudo -ErrorAction SilentlyContinue
if ($running) {
gsudo.exe -k
Start-Sleep -Milliseconds 500
}
$toolsPath = Split-Path -parent $MyInvocation.MyCommand.Definition
$unScriptPath = Join-Path $toolsPath "Uninstall-ChocolateyPath.psm1"
$installPath = "$env:ChocolateyInstall\lib\gsudo\bin\"
Import-Module $unScriptPath
Uninstall-ChocolateyPath $installPath 'Machine' | Out-Null
From: https://opensource.org/licenses/MIT
LICENSE
Copyright 2019 Gerardo Grignoli
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
function Uninstall-ChocolateyPath {
param(
[string] $pathToUninstall,
[System.EnvironmentVariableTarget] $pathType = [System.EnvironmentVariableTarget]::User
)
Write-Debug "Running 'Uninstall-ChocolateyPath' with pathToUninstall:`'$pathToUninstall`'";
#get the PATH variable
$envPath = $env:PATH
#$envPath = [Environment]::GetEnvironmentVariable('Path', $pathType)
if (!$envPath.ToLower().Contains($pathToUninstall.ToLower())) {
Write-Host "PATH environment variable does not have $pathToUninstall in it."
return
}
Write-Host "PATH environment variable has $pathToUninstall in it. Removing..."
$actualPath = [Environment]::GetEnvironmentVariable('Path', $pathType)
# escape regex metachars, match possible backslash and item separator at eol
$pathToUninstallRegex = ($pathToUninstall -replace '([\\().])', '\$1') + '\\?(;|$)'
# remove pathToUninstall from actualPath
$actualPath = $actualPath -replace "$pathToUninstallRegex", ''
if ($pathType -eq [System.EnvironmentVariableTarget]::Machine) {
$psArgs = "[Environment]::SetEnvironmentVariable('Path',`'$actualPath`', `'$pathType`')"
Start-ChocolateyProcessAsAdmin "$psArgs"
}
else {
[Environment]::SetEnvironmentVariable('Path', $actualPath, $pathType)
}
# remove from path of current powershell session
$envPSPath = $env:PATH
$env:Path = $envPSPath -replace "$pathToUninstallRegex", ''
}
VERIFICATION
Verification is intended to assist the Chocolatey moderators and community
in verifying that this package's contents are trustworthy.
1. The embedded files are also available as a release in GitHub.
Please go to releases page
https://github.com/gerardog/gsudo/releases
Download same version as this choco package (example for v0.4)
https://github.com/gerardog/gsudo/releases/tag/v0.4
unzip and get hashes
powershell -command Get-FileHash *
2. Get hashes from this choco package. Run:
powershell -command Get-FileHash bin\*
3. The checksums should match the following:
---
Version Hashes for v1.0.1
Algorithm Hash Path
--------- ---- ----
SHA256 26BAF4D9441DBCD669D840DCC97A905E3C1D1218819B36DB7CF9198D1FFB081D C:\git\gsudo\build\Chocolatey\gsudo\bin\gsudo.exe
SHA256 E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 C:\git\gsudo\build\Chocolatey\gsudo\bin\gsudo.exe.ignore
SHA256 50DC162DD7EC9259EF919ED04EB4AB563B366A50B57347D8CB5547036D5DE879 C:\git\gsudo\build\Chocolatey\gsudo\bin\gsudo.ps1
SHA256 E3B0C44298FC1C149AFBF4C8996FB92427AE41E4649B934CA495991B7852B855 C:\git\gsudo\build\Chocolatey\gsudo\bin\sudo.exe.ignore
Log in or click on link to see number of positives.
- gsudo.1.0.1.nupkg (4e6356e59a64) - ## / 62
- gsudo.exe (26baf4d9441d) - ## / 67
In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).
Chocolatey Pro provides runtime protection from possible malware.
Add to Builder | Version | Downloads | Last Updated | Status |
---|---|---|---|---|
gsudo - a sudo for windows 2.6.0 | 9488 | Friday, February 28, 2025 | Approved | |
gsudo - a sudo for windows 2.5.1 | 68525 | Thursday, May 30, 2024 | Approved | |
gsudo - a sudo for windows 2.5.0 | 2633 | Tuesday, May 28, 2024 | Approved | |
gsudo - a sudo for windows 2.4.4 | 32553 | Tuesday, February 20, 2024 | Approved | |
gsudo - a sudo for windows 2.4.3 | 93 | Tuesday, February 20, 2024 | Approved | |
gsudo - a sudo for windows 2.4.2 | 21548 | Monday, December 18, 2023 | Approved | |
gsudo - a sudo for windows 2.4.1-fixnoninteractive | 198 | Sunday, October 1, 2023 | Approved | |
gsudo - a sudo for windows 2.4.0 | 33673 | Sunday, August 27, 2023 | Approved | |
gsudo - a sudo for windows 2.3.1-beta | 176 | Tuesday, August 22, 2023 | Approved | |
gsudo - a sudo for windows 2.3.0 | 19949 | Monday, July 17, 2023 | Approved | |
gsudo - a sudo for windows 2.2.0 | 1161 | Monday, July 17, 2023 | Approved | |
gsudo - a sudo for windows 2.1.0 | 5274 | Sunday, July 9, 2023 | Approved | |
gsudo - a sudo for windows 2.0.10 | 16567 | Sunday, June 4, 2023 | Approved | |
gsudo - a sudo for windows 2.0.9 | 12204 | Tuesday, May 2, 2023 | Approved | |
gsudo - a sudo for windows 2.0.8 | 2066 | Sunday, April 30, 2023 | Approved | |
gsudo - a sudo for windows 2.0.7 | 1393 | Friday, April 28, 2023 | Approved | |
gsudo - a sudo for windows 2.0.6 | 16164 | Friday, March 24, 2023 | Approved | |
gsudo - a sudo for windows 2.0.4 | 39203 | Monday, November 21, 2022 | Approved | |
gsudo - a sudo for windows 2.0.3 | 1960 | Friday, November 18, 2022 | Approved | |
gsudo - a sudo for windows 2.0.2 | 4897 | Thursday, November 10, 2022 | Approved | |
gsudo - a sudo for windows 2.0.1 | 1662 | Tuesday, November 8, 2022 | Approved | |
gsudo - a sudo for windows 2.0.0 | 2141 | Sunday, November 6, 2022 | Approved | |
gsudo - a sudo for windows 2.0.0-preview | 226 | Sunday, October 23, 2022 | Approved | |
gsudo - a sudo for windows 1.7.1 | 9334 | Sunday, October 16, 2022 | Approved | |
gsudo - a sudo for windows 1.7.0 | 7726 | Wednesday, September 28, 2022 | Approved | |
gsudo - a sudo for windows 1.6.0 | 4492 | Wednesday, September 21, 2022 | Approved | |
gsudo - a sudo for windows 1.5.1 | 5686 | Friday, September 9, 2022 | Approved | |
gsudo - a sudo for windows 1.4.1 | 2203 | Tuesday, September 6, 2022 | Approved | |
gsudo - a sudo for windows 1.4.0 | 1748 | Sunday, September 4, 2022 | Approved | |
gsudo - a sudo for windows 1.3.0 | 36539 | Wednesday, April 13, 2022 | Approved | |
gsudo - a sudo for windows 1.2.1-alpha11 | 93 | Tuesday, April 12, 2022 | Approved | |
gsudo - a sudo for windows 1.2.1-alpha10 | 108 | Tuesday, April 12, 2022 | Approved | |
gsudo - a sudo for windows 1.2.0 | 6445 | Friday, March 25, 2022 | Approved | |
gsudo - a sudo for windows 1.1.1 | 5045 | Saturday, March 12, 2022 | Approved | |
gsudo - a sudo for windows 1.1.0 | 4612 | Sunday, February 27, 2022 | Approved | |
gsudo - a sudo for windows 1.0.2 | 37350 | Wednesday, August 18, 2021 | Approved | |
gsudo - a sudo for windows 1.0.1 | 4263 | Saturday, August 7, 2021 | Approved | |
gsudo - a sudo for windows 0.7.3 | 15019 | Sunday, December 20, 2020 | Approved | |
gsudo - a sudo for windows 0.7.2 | 6068 | Sunday, August 9, 2020 | Approved |
2019 Gerardo Grignoli
This package has no dependencies.
Ground Rules:
- This discussion is only about gsudo - a sudo for windows and the gsudo - a sudo for windows package. If you have feedback for Chocolatey, please contact the Google Group.
- This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
- The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
- Tell us what you love about the package or gsudo - a sudo for windows, or tell us what needs improvement.
- Share your experiences with the package, or extra configuration or gotchas that you've found.
- If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.