{"id":16887346,"url":"https://github.com/giuseppe/become-root","last_synced_at":"2025-03-22T08:30:55.805Z","repository":{"id":149335988,"uuid":"141539678","full_name":"giuseppe/become-root","owner":"giuseppe","description":"minimal tool for creating a new user namespace with multiple UIDs/GIDs mapped inside","archived":false,"fork":false,"pushed_at":"2022-01-24T09:56:06.000Z","size":45,"stargazers_count":52,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T09:51:38.022Z","etag":null,"topics":["containers","fakeroot","linux","sudo","userns","userns-remap"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giuseppe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2018-07-19T07:16:19.000Z","updated_at":"2025-03-10T17:28:47.000Z","dependencies_parsed_at":"2023-09-03T16:30:31.529Z","dependency_job_id":null,"html_url":"https://github.com/giuseppe/become-root","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/giuseppe%2Fbecome-root","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fbecome-root/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fbecome-root/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppe%2Fbecome-root/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giuseppe","download_url":"https://codeload.github.com/giuseppe/become-root/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244931427,"owners_count":20534006,"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":["containers","fakeroot","linux","sudo","userns","userns-remap"],"created_at":"2024-10-13T16:43:30.818Z","updated_at":"2025-03-22T08:30:55.800Z","avatar_url":"https://github.com/giuseppe.png","language":"C","readme":"become-root\n===========\n\nMinimal tool (when compiled with CFLAGS='-s', the binary is around\n10Kb) for launching a program into a new user namespace and have\nmultiple users mapped.\n\nThe `subuidmap` and `subgidmap` tools are required for setting up the\nuser namespace.\n\nThe current user is mapped to the root user into the namespace, while\nany additional uid/gid in `/etc/subuid` and `/etc/subgid` is mapped\nstarting with the ID 1.\n\n## Build\n\nAssuming you have the autotools and gcc installed:\n\n```console\n$ ./autogen.sh \u0026\u0026 ./configure \u0026\u0026 make\n```\n\n## Options\n\nSome options are available:\n\n* `a`: create all the namespaces\n* `c`: create a CGroup namespace\n* `i`: create an IPC namespace\n* `m`: create a mount namespace\n* `n`: create a network namespace\n* `p`: create a PID namespace and fork\n* `u`: create an UTS namespace\n* `P`: mount a new `/proc`\n* `S`: mount a new `/sys`\n* `N`: configure the network with slirp4netns\n\n## Examples\n\n```console\n$ become-root unshare -m echo hi from a new user and mount namespace\nhi from a new user and mount namespace\n\n$ become-root cat /proc/self/uid_map\n         0       1000          1\n         1     110000      65536\n\n$ become-root id\nuid=0(root) gid=0(root) groups=0(root),65534(nfsnobody) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023\n\n$ become-root -aPS ps aux\nUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND\nroot         1  0.0  0.0 246344  2016 pts/7   R+   13:58   0:00 ps aux\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppe%2Fbecome-root","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiuseppe%2Fbecome-root","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppe%2Fbecome-root/lists"}