Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goneri/vcenter-ldap-role-manager
CLI to add grant permission to your LDAP/AD users
https://github.com/goneri/vcenter-ldap-role-manager
Last synced: 25 days ago
JSON representation
CLI to add grant permission to your LDAP/AD users
- Host: GitHub
- URL: https://github.com/goneri/vcenter-ldap-role-manager
- Owner: goneri
- License: gpl-3.0
- Created: 2022-07-21T22:46:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-24T03:17:17.000Z (over 2 years ago)
- Last Synced: 2024-10-03T17:23:05.637Z (about 2 months ago)
- Language: Python
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CLI for vSphere 7.0.3 to set group and role to LDAP user
There is no API to set a role or a group to a LDAP/AD user. This CLI uses Selenium to interact with vSphere and register your user.
## Requirements
- `selenium`:
- `pip install selenium` in a Python virtual env
- `dnf install python3-selenium` on Fedora- `chromedriver`, `dnf install chromedriver` on Fedora
## Usage
```
usage: vcenter-ldap-role-manager [-h] [--debug] [--vmware-host VMWARE_HOST] [--vmware-user VMWARE_USER] [--vmware-password VMWARE_PASSWORD] [--headless] [--ignore-ssl-errors] [--add-group ADD_GROUP] [--add-role ADD_ROLE] username domainvSphere - Add AD/LDAP user to group and role
positional arguments:
username User name
domain The domain nameoptions:
-h, --help show this help message and exit
--debug Expose more information in the console.
--vmware-host VMWARE_HOST
vSphere host, default is to use VMWARE_HOST environment variable
--vmware-user VMWARE_USER
vSphere username, default is to use VMWARE_USER environment variable
--vmware-password VMWARE_PASSWORD
vSphere password, default is to use VMWARE_PASSWORD environment variable
--headless Hide the broswer window.
--ignore-ssl-errors Ignore the SSL errors with the vSphere server.
--add-group ADD_GROUP
Group to add the user to, e.g: Administrators
--add-role ADD_ROLE Role to add the user to, e.g: Administrator
```## Example
Register the user `foobar` add Administrator.
$ vcenter-ldap-role-manager foobar my-ldap-server --add-role Administrator --add-group Administrators
`my-ldap-server` is the name of your LDAP/AD directory in vSphere.
## Demo
[![demo](https://asciinema.org/a/510116.svg)](https://asciinema.org/a/510116?autoplay=1)
## Disclaimer
This tool interacts with vSphere web interface directly, because of that, it is likely to break with new vSphere release.
## License
GPLv3+