{ "info": { "author": "Josh Bialkowski", "author_email": "josh.bialkowski@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=======\nuchroot\n=======\n\nChroot without root priviledges.\n\n``uchroot.py`` uses linux user namespaces and mount namespaces to create\nchroot jails without root. It's not entirely a no-root solution because it\nrequires the newuidmap and newgidmap set-uid-root helper functions (on ubuntu,\ninstalled with the uidmap package).\n\nThis requirement is not really necessary if you only need to enter the chroot\njail with a single user id mapped.\n\n------------\nRequirements\n------------\n\nRequires a linux built with user namespaces enabled (note that red hat does\nnot by default) and the ``newuidmap`` setuid helper programs (install the\n``newuidmap`` ubuntu package).\n\nTo check if your kernel is built with user namespaces, on ubuntu::\n\n ~$ cat /boot/config-`uname -r` | grep CONFIG_USER_NS\n CONFIG_USER_NS=y\n\nOn other linuxes, perhaps try::\n\n ~$ zcat /proc/config.gz | grep CONFIG_USER_NS\n\n-----\nUsage\n-----\n\n::\n\n usage: uchroot [-h] [-v] [-l {debug,info,warning,error}] [-s] [-c CONFIG]\n [rootfs]\n\n Chroot without root priviledges This is a pretty simple process spawner that\n automates the construction of user and mount namespaces in order to create\n chroot jails without root. It's not entirely a no-root solution because it\n requires the newuidmap and newgidmap set-uid-root helper functions (on ubuntu,\n installed with the uidmap package). This requirement is not necessary if you\n only need to enter the chroot jail with a single user id mapped.\n\n positional arguments:\n rootfs path of the rootfs to enter\n\n optional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -l {debug,info,warning,error}, --log-level {debug,info,warning,error}\n Set the verbosity of messages\n -s, --subprocess use subprocess instead of exec\n -c CONFIG, --config CONFIG\n Path to config file\n --argv [ARGV [ARGV ...]]\n --cwd CWD\n --binds [BINDS [BINDS ...]]\n --gid-range [GID_RANGE [GID_RANGE ...]]\n --exbin EXBIN\n --qemu QEMU\n --uid-range [UID_RANGE [UID_RANGE ...]]\n --identity [IDENTITY [IDENTITY ...]]\n\nAdvanced configurations can be specified with a configuration file in python\nformat. Command line arguments override options specified in a configuration\nfile::\n\n # The directory to chroot into\n rootfs = \"/tmp/rootfs\"\n\n # List of paths to bind into the new root directory. These binds are\n # done inside a mount namespace and will not be reflected outside\n # the process tree started by the script.\n binds = [\n \"/dev/urandom\",\n \"/etc/resolv.conf\",\n ]\n\n # If specified, indicates the path to a qemu instance that should be bound\n # into the mount namespace of the jail\n qemu = \"/usr/bin/qemu-aarch64-static\"\n\n # After entering the jail, assume this [uid, gid]. [0, 0] for root.\n identity = (0, 0)\n\n # uids in the namespace starting at 1 are mapped to uids outside the\n # namespace starting with this value and up to this many ids. Note that\n # the uid range outside the namespace must lie within the current users\n # allowed subordinate uids. See (or modify) /etc/subid for the range\n # available to your user.\n uid_range = (100000, 65536)\n\n # Same as uid_map above, but for gids.\n gid_range = (100000, 65536)\n\n # Set the current working directory to this inside the jail\n cwd = \"/\"\n\n # The following variables specify what to execute after chrooting into the jail\n # -----------------------------------------------------------------------------\n\n # The path of the program to execute\n exbin = \"/bin/bash\"\n\n # The argument vector to expose as argv,argc to the called process\n argv = [\"bash\"],\n\n # The environment of the called process. Use an empty dictionary for an\n # empty environment, or None to use the host environment.\n env = {\n # Any environment variable encountered as a list will be join()ed using\n # path separator (':')\n \"PATH\": [\n # \"/usr/local/sbin\",\n # \"/usr/local/bin\",\n \"/usr/sbin\",\n \"/usr/bin\",\n \"/sbin\",\n \"/bin\"\n ],\n \"DEBIAN_FRONTEND\": \"noninteractive\",\n \"DEBCONF_NONINTERACTIVE_SEEN\": \"true\",\n \"LC_ALL\": \"C\",\n \"LANGUAGE\": \"C\",\n \"LANG\": \"C\"\n }\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/cheshirekow/uchroot/archive/0.1.4.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cheshirekow/uchroot", "keywords": "chroot,linux", "license": "", "maintainer": "", "maintainer_email": "", "name": "uchroot", "package_url": "https://pypi.org/project/uchroot/", "platform": "", "project_url": "https://pypi.org/project/uchroot/", "project_urls": { "Download": "https://github.com/cheshirekow/uchroot/archive/0.1.4.tar.gz", "Homepage": "https://github.com/cheshirekow/uchroot" }, "release_url": "https://pypi.org/project/uchroot/0.1.4/", "requires_dist": null, "requires_python": "", "summary": "chroot without root", "version": "0.1.4" }, "last_serial": 5410881, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "dcf6e749811bb6b29f719a2b3828dabd", "sha256": "a2ed1cb08b995c94ef582a038869e60f45caef25b8b78975920cc90ded876778" }, "downloads": -1, "filename": "uchroot-0.1.0.tar.gz", "has_sig": false, "md5_digest": "dcf6e749811bb6b29f719a2b3828dabd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9458, "upload_time": "2018-02-28T01:46:26", "url": "https://files.pythonhosted.org/packages/4c/05/fa7a90f1ea1b0e7dd57003b7b8113a6a4642a09cc471ff2604be9c5270f3/uchroot-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7a8473287fdd5024da80e47d4fecc896", "sha256": "9ce316406a7274e977370bfe878155e6093b2f052b19de66ccbc04a69f1312fb" }, "downloads": -1, "filename": "uchroot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7a8473287fdd5024da80e47d4fecc896", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10078, "upload_time": "2018-03-07T02:17:52", "url": "https://files.pythonhosted.org/packages/69/54/e8a377d5bc2be031de295036b716e1434067067a904a5fdc6e17a25a5fd8/uchroot-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "7da4a84cff1b796b62537ab4c8799888", "sha256": "6923ea4f2d155c491ef33bcd2382297ff3faf1dacab4f09d891b18d6e2e7d1ab" }, "downloads": -1, "filename": "uchroot-0.1.2.tar.gz", "has_sig": false, "md5_digest": "7da4a84cff1b796b62537ab4c8799888", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10210, "upload_time": "2018-03-30T03:43:42", "url": "https://files.pythonhosted.org/packages/f9/c2/0cd106f82b15383b966d3787dcec13c4e7a01153d40bcf1b43467dde9d72/uchroot-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "69daf7a6a39e57c20750cc02feb4ffbc", "sha256": "eaafc758351472cb0f617e9aa87b01d8eab5de97f464a29b70ed910d93ee62dc" }, "downloads": -1, "filename": "uchroot-0.1.3.tar.gz", "has_sig": false, "md5_digest": "69daf7a6a39e57c20750cc02feb4ffbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10419, "upload_time": "2018-09-16T02:13:33", "url": "https://files.pythonhosted.org/packages/23/c8/6c3ec94e685bd1c7cb8e6bfa929153a0431e0d1251cce00ca539a4fb40c8/uchroot-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "0da2504b852b34337bb2940702c35b0b", "sha256": "d10798def1033a9cac7507680fe514a0f248895d3836f3d38f64fb03af311b6d" }, "downloads": -1, "filename": "uchroot-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0da2504b852b34337bb2940702c35b0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25888, "upload_time": "2019-06-17T16:35:52", "url": "https://files.pythonhosted.org/packages/45/88/296bb8dcb6a8d4f1e423f30186dcaf2b5294ce017af467b7baf3dbb96cdc/uchroot-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "82bce23ca14bed02a83345d49e33f3e7", "sha256": "f0baf2769d71d4c006f1ed6e4254ec117ed9c6f5af75650a7fff213ff96116b6" }, "downloads": -1, "filename": "uchroot-0.1.4.tar.gz", "has_sig": false, "md5_digest": "82bce23ca14bed02a83345d49e33f3e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12031, "upload_time": "2019-06-17T16:35:54", "url": "https://files.pythonhosted.org/packages/00/c0/46398943d3a12cfc65b549d0092eee6e4a8d64da3e462527753ffb9b4733/uchroot-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0da2504b852b34337bb2940702c35b0b", "sha256": "d10798def1033a9cac7507680fe514a0f248895d3836f3d38f64fb03af311b6d" }, "downloads": -1, "filename": "uchroot-0.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0da2504b852b34337bb2940702c35b0b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 25888, "upload_time": "2019-06-17T16:35:52", "url": "https://files.pythonhosted.org/packages/45/88/296bb8dcb6a8d4f1e423f30186dcaf2b5294ce017af467b7baf3dbb96cdc/uchroot-0.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "82bce23ca14bed02a83345d49e33f3e7", "sha256": "f0baf2769d71d4c006f1ed6e4254ec117ed9c6f5af75650a7fff213ff96116b6" }, "downloads": -1, "filename": "uchroot-0.1.4.tar.gz", "has_sig": false, "md5_digest": "82bce23ca14bed02a83345d49e33f3e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12031, "upload_time": "2019-06-17T16:35:54", "url": "https://files.pythonhosted.org/packages/00/c0/46398943d3a12cfc65b549d0092eee6e4a8d64da3e462527753ffb9b4733/uchroot-0.1.4.tar.gz" } ] }