Name | creds JSON |
Version |
1.0.16
JSON |
| download |
home_page | http://github.com/jonhadfield/creds |
Summary | Creds is a library for managing Linux, FreeBSD and OpenBSD user accounts and credentials. |
upload_time | 2024-03-20 17:21:44 |
maintainer | None |
docs_url | None |
author | Jon Hadfield |
requires_python | None |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
|
coveralls test coverage |
|
.. image:: https://readthedocs.org/projects/creds/badge/?version=master
:target: https://creds.readthedocs.io/en/master/?badge=master
:alt: Documentation Status
.. image:: https://coveralls.io/repos/github/jonhadfield/creds/badge.svg?branch=master
:target: https://coveralls.io/github/jonhadfield/creds?branch=master
.. image:: https://circleci.com/gh/jonhadfield/creds.svg?style=svg
:target: https://circleci.com/gh/jonhadfield/creds
.. image:: https://travis-ci.org/jonhadfield/creds.svg?branch=master
:target: https://travis-ci.org/jonhadfield/creds
Creds
=====
Creds is a library that simplifies the management of user accounts and
their credentials on Linux, FreeBSD and OpenBSD.
Instead of issuing commands to create, update and delete users and their
ssh keys, supply Creds with details of the users you want and it will
take care of the implementation.
The supported inputs are currently YAML, JSON or python dictionaries.
User vs System accounts
-----------------------
| Linux has a default range of user ids to provide to system and user
accounts, found in /etc/login.defs.
| Creds will attempt to read this file to determine which accounts are
in scope for management and, if unavailable, will default to:
| UID\_MIN = 1000 # User accounts will have an id of 1000 or more
| UID\_MAX = 60000 # User accounts will not have an id higher than
60000
Example Usage
-------------
Read a list of users from users.yml and create them (if missing) or
update (if existing):
::
from creds.users import Users
from creds.plan import (create_plan, execute_plan)
existing_users = Users.from_passwd() # Get a list of existing users and their keys
proposed_users = Users.from_yaml('users.yml') # Read the proposed list of users and their keys
# Generate a list of operations to transition from current to existing
plan = create_plan(existing_users=existing_users, proposed_users=proposed_users)
execute_plan(plan=plan) # Execute the plan
Deleting users
If your input defines all of the user accounts you want to exist, you
can choose to purge any that are undefined by adding a parameter to
create\_plan:
::
plan = create_plan(existing_users=existing_users, proposed_users=proposed_users,
purge_undefined=True)
Protecting users
If there are users you want to protect from change, e.g. you want to
make sure that certain users are not deleted or updated under any
circumstances, then you can supply a list of usernames for Creds to
ignore:
::
plan = create_plan(existing_users=existing_users, proposed_users=proposed_users,
purge_undefined=True, protected_users=['rod', 'jane', 'freddy'])
Raw data
{
"_id": null,
"home_page": "http://github.com/jonhadfield/creds",
"name": "creds",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Jon Hadfield",
"author_email": "jon@lessknown.co.uk",
"download_url": "https://files.pythonhosted.org/packages/05/e0/fa0ff3435105239140587a13f838ca47b2a9b2289162db1ee4f226c73f6f/creds-1.0.16.tar.gz",
"platform": null,
"description": ".. image:: https://readthedocs.org/projects/creds/badge/?version=master\n :target: https://creds.readthedocs.io/en/master/?badge=master\n :alt: Documentation Status\n.. image:: https://coveralls.io/repos/github/jonhadfield/creds/badge.svg?branch=master\n :target: https://coveralls.io/github/jonhadfield/creds?branch=master\n.. image:: https://circleci.com/gh/jonhadfield/creds.svg?style=svg\n :target: https://circleci.com/gh/jonhadfield/creds\n.. image:: https://travis-ci.org/jonhadfield/creds.svg?branch=master\n :target: https://travis-ci.org/jonhadfield/creds\n\n\nCreds\n=====\n\nCreds is a library that simplifies the management of user accounts and\ntheir credentials on Linux, FreeBSD and OpenBSD.\n\nInstead of issuing commands to create, update and delete users and their\nssh keys, supply Creds with details of the users you want and it will\ntake care of the implementation.\n\nThe supported inputs are currently YAML, JSON or python dictionaries.\n\nUser vs System accounts\n-----------------------\n\n| Linux has a default range of user ids to provide to system and user\n accounts, found in /etc/login.defs.\n| Creds will attempt to read this file to determine which accounts are\n in scope for management and, if unavailable, will default to:\n\n | UID\\_MIN = 1000 # User accounts will have an id of 1000 or more\n | UID\\_MAX = 60000 # User accounts will not have an id higher than\n 60000\n\nExample Usage\n-------------\n\nRead a list of users from users.yml and create them (if missing) or\nupdate (if existing):\n\n::\n\n from creds.users import Users\n from creds.plan import (create_plan, execute_plan)\n\n existing_users = Users.from_passwd() # Get a list of existing users and their keys\n proposed_users = Users.from_yaml('users.yml') # Read the proposed list of users and their keys\n\n # Generate a list of operations to transition from current to existing\n plan = create_plan(existing_users=existing_users, proposed_users=proposed_users)\n execute_plan(plan=plan) # Execute the plan\n\nDeleting users\n\n\nIf your input defines all of the user accounts you want to exist, you\ncan choose to purge any that are undefined by adding a parameter to\ncreate\\_plan:\n\n::\n\n plan = create_plan(existing_users=existing_users, proposed_users=proposed_users,\n purge_undefined=True)\n\nProtecting users\n\n\nIf there are users you want to protect from change, e.g. you want to\nmake sure that certain users are not deleted or updated under any\ncircumstances, then you can supply a list of usernames for Creds to\nignore:\n\n::\n\n plan = create_plan(existing_users=existing_users, proposed_users=proposed_users,\n purge_undefined=True, protected_users=['rod', 'jane', 'freddy'])\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Creds is a library for managing Linux, FreeBSD and OpenBSD user accounts and credentials.",
"version": "1.0.16",
"project_urls": {
"Homepage": "http://github.com/jonhadfield/creds"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "34af1c23f3d6c8107750e6e5a375cd4dc6f69f4dbf669e23768a048afbb8312f",
"md5": "444e58c1418f8e8e413cd42c5a9a6329",
"sha256": "7c7d880ec7bc82751dd38051c862986d3b77e759c7b49d900cbe43c5b6ef5421"
},
"downloads": -1,
"filename": "creds-1.0.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "444e58c1418f8e8e413cd42c5a9a6329",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 24459,
"upload_time": "2024-03-20T17:21:42",
"upload_time_iso_8601": "2024-03-20T17:21:42.747471Z",
"url": "https://files.pythonhosted.org/packages/34/af/1c23f3d6c8107750e6e5a375cd4dc6f69f4dbf669e23768a048afbb8312f/creds-1.0.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "05e0fa0ff3435105239140587a13f838ca47b2a9b2289162db1ee4f226c73f6f",
"md5": "0a3f73bf5ecde9621486714b6f849f5e",
"sha256": "7553178164cfe1f9a2043bc22c7ee156b6156bd82704418571cf1d8eb9cf1c51"
},
"downloads": -1,
"filename": "creds-1.0.16.tar.gz",
"has_sig": false,
"md5_digest": "0a3f73bf5ecde9621486714b6f849f5e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26660,
"upload_time": "2024-03-20T17:21:44",
"upload_time_iso_8601": "2024-03-20T17:21:44.123312Z",
"url": "https://files.pythonhosted.org/packages/05/e0/fa0ff3435105239140587a13f838ca47b2a9b2289162db1ee4f226c73f6f/creds-1.0.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-20 17:21:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jonhadfield",
"github_project": "creds",
"travis_ci": true,
"coveralls": true,
"github_actions": false,
"circle": true,
"landscape": true,
"tox": true,
"lcname": "creds"
}