• Version: 1
  • Contributor: Stonebranch Stonebranch
  • Compatibility: UA 6.4.x, UC 6.4.x
  • Prerequisites: Python 2.7.12 for Linux
  • Author: Colin Cocksedge
  • OS: Linux
  • Product: Universal Agent, Universal Controller
  • Support: Stonebranch

Add/Remove Users from a Group (Linux)

Add/Remove Users from a Group (Linux)

The here described Universal Task allows to mass add and remove users from a Universal Controller Group. This Universal Task is really helpful for all our customers using local users.

The data to add and/or remove users from a group is provided by a CSV file loaded to the Universal Controller script library. The Universal Task uses the REST API of the Universal Controller to add and remove users from a group. The Rest API commands are executed using the Python requests module.

 

Some details about the universal task to add and remove users from a group:

- The Universal Task uses the REST API of the Controller to add and remove users

- The User to add and remove from a group are provided by CSV file loaded to the Universal Controller Script library

- The Universal Task supports both Universal Agent for Linux/Unix and Windows (Note: this Universal Task has only been tested on Linux)

- You can select different log-levels e.g. Info and debug

- All Passwords are encrypted using Controller Credentials

 

Sample CSV file:

You can copy and paste the CSV to the script library or load a CSV from an external file.

The CSV file has the following structure:

 

USER,GROUP,[Add|Delete]

testuser1,testgroup,Add

testuser2,testgroup,Add

testuser3,testgroup,Delete