{"id":17384016,"url":"https://github.com/mcandre/posix-sudo-shim","last_synced_at":"2025-08-26T19:21:41.965Z","repository":{"id":66387102,"uuid":"115655785","full_name":"mcandre/posix-sudo-shim","owner":"mcandre","description":"a workaround for UNIX systems that lack full sudo","archived":false,"fork":false,"pushed_at":"2020-09-12T18:03:27.000Z","size":14,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-01T23:36:27.383Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcandre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-28T20:06:29.000Z","updated_at":"2022-01-09T14:37:14.000Z","dependencies_parsed_at":"2023-03-19T13:20:03.345Z","dependency_job_id":null,"html_url":"https://github.com/mcandre/posix-sudo-shim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcandre%2Fposix-sudo-shim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcandre%2Fposix-sudo-shim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcandre%2Fposix-sudo-shim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcandre%2Fposix-sudo-shim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcandre","download_url":"https://codeload.github.com/mcandre/posix-sudo-shim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924515,"owners_count":20694730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T07:44:24.480Z","updated_at":"2025-03-27T21:15:19.609Z","avatar_url":"https://github.com/mcandre.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# posix-sudo-shim: a workaround for UNIX systems that lack full sudo\n\n# EXAMPLE\n\n```console\n$ sudo echo 'all ur base r belong to us' \u003e/flag.txt\n$ cat /flag.txt\nall ur base r belong to us\n```\n\n# ABOUT\n\nposix-sudo-shim is a minimal drop-in replacement for [sudo](https://www.sudo.ws/), a full-feature elevated command execution system. posix-sudo-shim does not attempt to support the vast majority of sudo's many features, but rather provides minimal syntax and semantics support, in order to help in porting shell scripts between different UNIX systems, where sudo may not be present, but is called for by the scripts.\n\n# NOTES\n\nSome commands may break with `sudo`..., such as in Haiku nightly, where the underlying `su` may be broken. For such primarily single-user environments, a more reliable `sudo` shim would look like:\n\n```sh\n#!/bin/sh\n# Assume root-level privileges and avoid PTY's\n\"$@\"\n```\n\n# INSTALL\n\n```console\n$ git clone https://github.com/mcandre/posix-sudo-shim.git\n$ cp posix-sudo-shim/lib/sudo /bin\n```\n\n# UNINSTALL\n\n```console\n$ rm /bin/sudo\n```\n\n# REQUIREMENTS\n\n* [coreutils](https://www.gnu.org/software/coreutils/coreutils.html)\n\n## Recommended\n\n* [vast](http://github.com/mcandre/vast)\n* [shfmt](https://github.com/mvdan/sh) (e.g. `GO111MODULE=on go get mvdan.cc/sh/v3/cmd/shfmt`)\n* [bashate](https://pypi.python.org/pypi/bashate/0.5.1)\n* [checkbashisms](https://sourceforge.net/projects/checkbaskisms/)\n* [ShellCheck](https://hackage.haskell.org/package/ShellCheck)\n* [stank](https://github.com/mcandre/stank) (e.g. `go get github.com/mcandre/stank/...`)\n\n# DEVELOPMENT\n\n## Lint\n\n```console\n$ vast [lint]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcandre%2Fposix-sudo-shim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcandre%2Fposix-sudo-shim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcandre%2Fposix-sudo-shim/lists"}