Remove User from Group Example



Example Overview

Example name : RemoveUserFromGroup.java
Location : <Web NMS Home>/examples/Security/authorization directory

This example explains how to use the method "removeUserFromGroup()" and class file will remove the specified user from an already existing group. When the user name and the group name are specified in the command line arguments, the respective user will be removed from the appropriate group. 

The interface used in this example is AuthorizationAdmin

Method used in this example is :

Note : The source code will have comment statements in it which will explain to you the different segments of the program.

 

Integration with Web NMS

The steps given below will help you in integrating this example with Web NMS. If any of the steps given below are not followed properly, then the example might not function in a desired manner.

java  com.adventnet.nms.example.security.authorization.RemoveUserFromGroup <username> <group name>

 

Sample Output

On giving a username and group name as arguments to this example program, the output of the program printed in your console, will be : "Removed <user name> from  <group name>" or "Error. user does not exist."

 

De-referencing

After you have tried this example, to remove its association with Web NMS, you must remove the class file RemoveUserFromGroup.class from <Web NMS Home>/classes/com/adventnet/nms/example/security/authorization directory.


Copyright © 1996-2002, AdventNet Inc. All Rights Reserved.