{ "info": { "author": "NetAngels", "author_email": "info@netangels.ru", "bugtrack_url": null, "classifiers": [], "description": "With each user\n================\n\nThe `with_each_user` command is basically nothing but a shortcut/replacement\nfor constructs like::\n\n root:~# ls /home | xargs -i su - {} -c \"whoami\"\n\nThat is, its goal is to execute the same command for all users in the system\nin a row. The line above can be rewritten with::\n\n root:~# with_each_user whoami\n\nAdditionally, you can filter out unneeded users by their logins, shells and\nuid, run commands simultaneously, interactively, and store script outputs\nin log files in a separate directory.\n\nSee usage for details.\n\n\nUsage\n------\n\n\nThis is the ``with_each_user --help`` output::\n\n usage: with_each_user [-h] [-m MASK] [-s SHELL] [-u MIN_UID] [-U MAX_UID]\n [-c CONCURRENCY] [-d CURRENT_DIRECTORY] [-i]\n [-L LOG_DIRECTORY]\n command [command ...]\n\n Execute a command for a number users in the server\n\n positional arguments:\n command Shell command to execute\n\n optional arguments:\n -h, --help show this help message and exit\n -m MASK, --mask MASK Filter users by their logins. Globbing is here\n allowed, you can type, for example, \"user*\"\n -s SHELL, --shell SHELL\n Filter users by their shells. For example, you can\n exclude the majority of system users by issuing\n \"/bin/bash\" here\n -u MIN_UID, --min-uid MIN_UID\n Filter users by their minimal uid.\n -U MAX_UID, --max-uid MAX_UID\n Filter users by their max uid (to filter out \"nobody\",\n for example\n -c CONCURRENCY, --concurrency CONCURRENCY\n Number of processes to run simultaneously\n -d CURRENT_DIRECTORY, --current-directory CURRENT_DIRECTORY\n Script working directory (relative to user's home)\n -p, --preserve-environment\n Preserve root environment. Arguments match the same of\n \"su\" command\n -f, --format Format command line with variables custom for every\n user. Supported variables: {user}, {uid}, {gid},\n {home}, {shell}, {gecos}.\n -r, --root Run command with root privileges (do not \"su\" to\n selected user). Option \"--format\" is helpful there\n -i, --interactive Interactive execution. Set this flag to run processes\n interactively\n -L LOG_DIRECTORY, --log-directory LOG_DIRECTORY\n Directory to store log for all executions. Omit this\n argument if you want just to print everything to\n stdout/stderr\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/NetAngels/with-each-user", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "with-each-user", "package_url": "https://pypi.org/project/with-each-user/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/with-each-user/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/NetAngels/with-each-user" }, "release_url": "https://pypi.org/project/with-each-user/0.9.2/", "requires_dist": null, "requires_python": null, "summary": "utility which helps to execute commands on behalf of all users in the system in a row", "version": "0.9.2" }, "last_serial": 801689, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "002defc7074f864a519b522356604cd2", "sha256": "6eeb08b6d4ff413f19c9b63263d10bd50a7d589801574810429afa91298b1373" }, "downloads": -1, "filename": "with-each-user-0.9.tar.gz", "has_sig": false, "md5_digest": "002defc7074f864a519b522356604cd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3140, "upload_time": "2012-08-07T11:46:33", "url": "https://files.pythonhosted.org/packages/50/09/85c4b641fb2ea2e4c190378c7f8fb672d8c0b35127106a390c24a1fafff4/with-each-user-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "e4698ff2d81af80369be791c1f5e106d", "sha256": "bcb6fba6263c8e0fbcbe37221903b4ba2ba24a73b8a66475a4359df39b98791d" }, "downloads": -1, "filename": "with-each-user-0.9.1.tar.gz", "has_sig": false, "md5_digest": "e4698ff2d81af80369be791c1f5e106d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3230, "upload_time": "2012-08-07T12:24:23", "url": "https://files.pythonhosted.org/packages/98/32/6bd0fc216c5afd8d8f924e1fb30bec10b73fbcf770d29bc2b986191483be/with-each-user-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "cad3d0c312c8c65e9a027f8a387c7b3b", "sha256": "0252648503c511edeaf58e5efbaffbcb0fc574ab2811f7184392bf298240c828" }, "downloads": -1, "filename": "with-each-user-0.9.2.tar.gz", "has_sig": false, "md5_digest": "cad3d0c312c8c65e9a027f8a387c7b3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4241, "upload_time": "2012-11-23T08:27:23", "url": "https://files.pythonhosted.org/packages/4a/88/ae60c0c354cd875bf707f00fcfcf21f76487b227ac9d525db1da44a03cc5/with-each-user-0.9.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cad3d0c312c8c65e9a027f8a387c7b3b", "sha256": "0252648503c511edeaf58e5efbaffbcb0fc574ab2811f7184392bf298240c828" }, "downloads": -1, "filename": "with-each-user-0.9.2.tar.gz", "has_sig": false, "md5_digest": "cad3d0c312c8c65e9a027f8a387c7b3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4241, "upload_time": "2012-11-23T08:27:23", "url": "https://files.pythonhosted.org/packages/4a/88/ae60c0c354cd875bf707f00fcfcf21f76487b227ac9d525db1da44a03cc5/with-each-user-0.9.2.tar.gz" } ] }