{"id":18734274,"url":"https://github.com/schctl/mk","last_synced_at":"2025-11-15T00:30:16.067Z","repository":{"id":200504108,"uuid":"705641063","full_name":"schctl/mk","owner":"schctl","description":"Privilege management for *nix systems","archived":false,"fork":false,"pushed_at":"2023-10-16T12:15:20.000Z","size":155,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T19:07:56.906Z","etag":null,"topics":["privileges","rust","sudo"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schctl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-16T12:14:46.000Z","updated_at":"2024-01-23T17:57:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae6eb56c-a9ed-40ad-bbe4-19a60d705ee7","html_url":"https://github.com/schctl/mk","commit_stats":null,"previous_names":["schctl/mk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schctl%2Fmk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schctl%2Fmk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schctl%2Fmk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schctl%2Fmk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schctl","download_url":"https://codeload.github.com/schctl/mk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239605694,"owners_count":19667104,"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":["privileges","rust","sudo"],"created_at":"2024-11-07T15:12:53.924Z","updated_at":"2025-11-15T00:30:15.994Z","avatar_url":"https://github.com/schctl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mk (^∇^)-b\n\n`mk` is a tool to run commands as another user. It is similar to [`doas`](https://github.com/Duncaen/OpenDoas) or [`sudo`](https://github.com/sudo-project/sudo).\n\n---\n\n## Building `mk`\n\n### Requirements\n\n- Rust 1.56+\n- A C compiler\n- [Bindgen requirements](https://rust-lang.github.io/rust-bindgen/requirements.html)\n\n### Feature flags\n\n| Flag     | Description                                                                                                                     |\n| -------- | ------------------------------------------------------------------------------------------------------------------------------- |\n| `pam`    | Builds with for authentication using [`PAM`](https://en.wikipedia.org/wiki/Pluggable_authentication_module) (requires `libpam`) |\n| `shadow` | Builds with support for authentication using the shadow password database                                                       |\n\n## Configuration\n\n`mk` searches for rules defined in `/etc/mk.conf`, configured in the [`TOML`](https://toml.io/en/) format.\n\n### Minimal configuration\n\n```toml\n[policies.default.permits]\nall-targets = true\n\n[groups]\nwheel = \"default\"\n```\n\n### A more detailed example\n\n```toml\n# A policy defines how `mk` behaves\n[policies]\n\n# Definitions for a policy named \"default\"\n[policies.default]\n\n# Permitted actions\n[policies.default.permits]\n# Allow executing actions as all users\n# Default: false\nall-targets = false\n\n# Users that this policy allows executing actions as\n# Default: (empty)\ntargets = [\n    \"root\"\n]\n\n# Runtime behavior\n[policies.default.session]\n# Allow users of this policy to execute actions without authentication\n# Default: false\nno-auth = false\n\n# Inactive duration after which a user will need to be re-authenticated\n# Default: -1 (no timeout) - the user will be re-authenticated each time\nrefresh = 5 # minutes\n\n# A more restricted policy\n[policies.restricted]\n\n# Policy for groups\n[groups]\nwheel = \"default\"\n\n# Policy to use for each user\n[users]\n# Dummy will use the restricted policy even if they\n# are part of the wheel group\ndummy = \"restricted\"\n```\n\n---\n\n### Disclaimer\n\nI am not an expert, and this project is still very early in development. Don't use this anywhere except for testing.\n\n### License\n\n`mk` and all its crates are distributed under the terms of the MIT license. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschctl%2Fmk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschctl%2Fmk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschctl%2Fmk/lists"}