Name | activedirectorytoolsforpython JSON |
Version |
0.2.0
JSON |
| download |
home_page | https://newgit.inuxnet.org/devel/activedirectorytoolsforpython |
Summary | Set of tools for Active Directory using python. |
upload_time | 2024-12-01 21:56:02 |
maintainer | None |
docs_url | None |
author | Jess Williams |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2024 Jess Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
ad
activedirectory
ldap
get-aduser
powershell
get-adgroup
get-adorganizationalunit
get-adobject
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# activedirectorytoolsforpython
This library and set of tools was designed for accessing active directory
in an intuitive way compared to Microsoft Active Directory on Powershell.
It is intended for Linux Operating systems and will be complimented by
powershell modules for Linux to mimic the functionality of Active Directory
tools for powershell that is only available on Windows.
## Installing
This module requires ldap3, gssapi, and cryptography. Building the modules
may require the installation of various tools and libraries on the Linux OS.
Having Kerberos installed and configyred on your system is highly recommended
and may be essential. Although kerberos is not needed to make the connection,
it is highly advisable and easier to utilize these tools and libraries with
Kerberos installed and configured.
### To Build the ldap3 and gssapi python modules
Build Essentials, Development Tools, or Equivalent
Must install krb5-config development libraries
May require more libraries on the respective systems.
### Setting up and activating the Python Virtual Environment
It is recommended to install within a Python Virtual Environment, please review your
specific OS instructions to install VirtualEnv on your system.
From the directory of the repository:
```
python3 -m venv venv
```
Activating the Virtual Environment:
```
. venv/bin/activate
```
To exit the Virtual Environment:
```
deactivate
```
### Installing using the setup.py
All commands should be run from the root directory of the repository.
```
pip install -r requirements.txt
python3 setup.py install
```
### Installing from [PyPi](https://pypi.org)
```
pip install activedirectorytoolsforpython
```
## Usage
This module is designed to be used from the command line to display or
pipe output to other commands. It can also be used as a library to create
other scripts upon in pure python. The intentions of this library was
to create Powershell modules to mimic Active Directory Tools.
The examples below assume you have initialized your Kerberos tokens with
kinit.
```
kinit bob123
```
If you choose you can use SIMPLE authentication with a username and password.
If the username is added, Kerberso will not be used, if the password is
ommitted, the user will be prompted for the password using getpass.
### Python Examples
All Functions available have help, here are few examples of how to use the
primary functions:
Get All ADUser Objects in your Default Domain using ldaps with Certificate
with mail and sAMAccountName properties
```
from activedirectorytoolsforpython import *
aduser_objects = get_aduser(identity="*",cacert="./root_domain_ca.pem",properties=["mail","sAMAccountName"])
for aduser in aduser_objects:
print(aduser)
```
Get a Specific User from a specific Searchbase using ldaps No Verify Certificate
with all properties
```
from activedirectorytoolsforpython import *
aduser_objects = get_aduser(identity="bob123",verify=False,properties='*')[0]
print(aduser)
```
Get all users with the last name of Smith using ldaps No Verify Certificate
with all properties
```
from activedirectorytoolsforpython import *
aduser_objects = get_aduser(filter="sn=Smith",verify=False,properties='ALL')
for aduser in aduser_objects:
print(aduser)
```
Get all users with the last name of Smith using ldaps No Verify Certificate
with all properties using ADObject
```
from activedirectorytoolsforpython import *
aduser_objects = get_adobject(filter="(&(objectClass=user)(sn=Smith))",verify=False,properties='ALL')
for aduser in aduser_objects:
print(aduser)
```
### Shell Examples
Example for Getting a Group in Bash
```
GetADGroup -identity DnsAdmins -noverify -properties sAMAccountName,whenCreated,cn
```
Example for piping results into another command using the json flag
```
$psObj = Invoke-Expression -Command "GetADGroup -identity DnsAdmins -noverify -properties sAMAccountName,whenCreated,cn -json" | ConvertFrom-Json
```
Raw data
{
"_id": null,
"home_page": "https://newgit.inuxnet.org/devel/activedirectorytoolsforpython",
"name": "activedirectorytoolsforpython",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "ad, activedirectory, ldap, get-aduser, powershell, get-adgroup, get-adorganizationalunit, get-adobject",
"author": "Jess Williams",
"author_email": "Jess Williams <devel@inuxnet.org>",
"download_url": "https://files.pythonhosted.org/packages/d3/01/035b7a74323f273ce6e1ccbb053b1b73e1e0ab52d5beb7526d64d2bcbfbf/activedirectorytoolsforpython-0.2.0.tar.gz",
"platform": null,
"description": "# activedirectorytoolsforpython\n\nThis library and set of tools was designed for accessing active directory \nin an intuitive way compared to Microsoft Active Directory on Powershell. \nIt is intended for Linux Operating systems and will be complimented by \npowershell modules for Linux to mimic the functionality of Active Directory \ntools for powershell that is only available on Windows.\n\n## Installing\n\nThis module requires ldap3, gssapi, and cryptography. Building the modules \nmay require the installation of various tools and libraries on the Linux OS.\nHaving Kerberos installed and configyred on your system is highly recommended \nand may be essential. Although kerberos is not needed to make the connection,\nit is highly advisable and easier to utilize these tools and libraries with \nKerberos installed and configured.\n\n### To Build the ldap3 and gssapi python modules\nBuild Essentials, Development Tools, or Equivalent\nMust install krb5-config development libraries\nMay require more libraries on the respective systems.\n\n### Setting up and activating the Python Virtual Environment\n\nIt is recommended to install within a Python Virtual Environment, please review your \nspecific OS instructions to install VirtualEnv on your system.\n\nFrom the directory of the repository:\n\n```\npython3 -m venv venv\n```\n\nActivating the Virtual Environment:\n```\n. venv/bin/activate\n```\n\nTo exit the Virtual Environment:\n\n```\ndeactivate\n```\n\n### Installing using the setup.py\n\nAll commands should be run from the root directory of the repository.\n```\npip install -r requirements.txt\npython3 setup.py install\n```\n\n### Installing from [PyPi](https://pypi.org)\n\n```\npip install activedirectorytoolsforpython\n```\n\n## Usage\n\nThis module is designed to be used from the command line to display or \npipe output to other commands. It can also be used as a library to create\nother scripts upon in pure python. The intentions of this library was \nto create Powershell modules to mimic Active Directory Tools.\n\nThe examples below assume you have initialized your Kerberos tokens with\nkinit.\n```\nkinit bob123\n```\n\nIf you choose you can use SIMPLE authentication with a username and password.\nIf the username is added, Kerberso will not be used, if the password is \nommitted, the user will be prompted for the password using getpass.\n\n### Python Examples\n\nAll Functions available have help, here are few examples of how to use the \nprimary functions:\n\nGet All ADUser Objects in your Default Domain using ldaps with Certificate \nwith mail and sAMAccountName properties\n```\nfrom activedirectorytoolsforpython import *\naduser_objects = get_aduser(identity=\"*\",cacert=\"./root_domain_ca.pem\",properties=[\"mail\",\"sAMAccountName\"])\nfor aduser in aduser_objects:\n print(aduser)\n```\n\nGet a Specific User from a specific Searchbase using ldaps No Verify Certificate \nwith all properties\n```\nfrom activedirectorytoolsforpython import *\naduser_objects = get_aduser(identity=\"bob123\",verify=False,properties='*')[0]\nprint(aduser)\n```\n\nGet all users with the last name of Smith using ldaps No Verify Certificate \nwith all properties \n```\nfrom activedirectorytoolsforpython import *\naduser_objects = get_aduser(filter=\"sn=Smith\",verify=False,properties='ALL')\nfor aduser in aduser_objects:\n print(aduser)\n```\n\nGet all users with the last name of Smith using ldaps No Verify Certificate \nwith all properties using ADObject\n```\nfrom activedirectorytoolsforpython import *\naduser_objects = get_adobject(filter=\"(&(objectClass=user)(sn=Smith))\",verify=False,properties='ALL')\nfor aduser in aduser_objects:\n print(aduser)\n```\n\n### Shell Examples\n\nExample for Getting a Group in Bash\n```\nGetADGroup -identity DnsAdmins -noverify -properties sAMAccountName,whenCreated,cn\n```\n\nExample for piping results into another command using the json flag\n```\n$psObj = Invoke-Expression -Command \"GetADGroup -identity DnsAdmins -noverify -properties sAMAccountName,whenCreated,cn -json\" | ConvertFrom-Json\n```\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Jess Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Set of tools for Active Directory using python.",
"version": "0.2.0",
"project_urls": {
"Documentation": "https://newgit.inuxnet.org/devel/activedirectorytoolsforpython",
"Homepage": "https://newgit.inuxnet.org/devel/activedirectorytoolsforpython",
"Repository": "https://newgit.inuxnet.org/devel/activedirectorytoolsforpython"
},
"split_keywords": [
"ad",
" activedirectory",
" ldap",
" get-aduser",
" powershell",
" get-adgroup",
" get-adorganizationalunit",
" get-adobject"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "85079f71689aebd77cf5447b90caddbee553b8a029690fd7883ff4383223cd70",
"md5": "e706db780a2ae3155e71f27e9d3b86c9",
"sha256": "8d89fc6b92b8f7a97ac2ef0fd6a613be2b41c299f4d0126dd6faf2ed733c0444"
},
"downloads": -1,
"filename": "activedirectorytoolsforpython-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e706db780a2ae3155e71f27e9d3b86c9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11766,
"upload_time": "2024-12-01T21:55:59",
"upload_time_iso_8601": "2024-12-01T21:55:59.383522Z",
"url": "https://files.pythonhosted.org/packages/85/07/9f71689aebd77cf5447b90caddbee553b8a029690fd7883ff4383223cd70/activedirectorytoolsforpython-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d301035b7a74323f273ce6e1ccbb053b1b73e1e0ab52d5beb7526d64d2bcbfbf",
"md5": "64a920a846478adaf506852aa1899e7a",
"sha256": "f54fd091d5f9edf0f9df146efef97948c7985d23a5d23b6d0de22db62e3ce7c0"
},
"downloads": -1,
"filename": "activedirectorytoolsforpython-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "64a920a846478adaf506852aa1899e7a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11362,
"upload_time": "2024-12-01T21:56:02",
"upload_time_iso_8601": "2024-12-01T21:56:02.354727Z",
"url": "https://files.pythonhosted.org/packages/d3/01/035b7a74323f273ce6e1ccbb053b1b73e1e0ab52d5beb7526d64d2bcbfbf/activedirectorytoolsforpython-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-01 21:56:02",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "activedirectorytoolsforpython"
}