Coder Social home page Coder Social logo

vcenter-ldap-role-manager's Introduction

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 domain

vSphere - Add AD/LDAP user to group and role

positional arguments:
  username              User name
  domain                The domain name

options:
  -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

Disclaimer

This tool interacts with vSphere web interface directly, because of that, it is likely to break with new vSphere release.

License

GPLv3+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.