s.n.g.cmd_group_add_members(Command) : class documentation

Part of samba.netcmd.group View In Hierarchy

Add members to an AD group

This command adds one or more members to an existing Active Directory group. The command accepts one or more group member names seperated by commas. A group member may be a user or computer account or another Active Directory group.

When a member is added to a group the member may inherit permissions and rights from the group. Likewise, when permission or rights of a group are changed, the changes may reflect in the members through inheritance.

Example1: samba-tool group addmembers supergroup Group1,Group2,User1 -H ldap://samba.samdom.example.com -Uadministrator%passw0rd

Example1 shows how to add two groups, Group1 and Group2 and one user account, User1, to the existing AD group named supergroup. The command will be run on a remote server specified with the -H. The -U parameter is used to pass the userid and password of a user authorized to issue the command on the remote server.

Example2: sudo samba-tool group addmembers supergroup User2

Example2 shows how to add a single user account, User2, to the supergroup AD group. It uses the sudo command to run as root when issuing the command.

Method run Run the command. This should be overriden by all subclasses.

Inherited from Command:

Method __init__ Undocumented
Method usage Undocumented
Method show_command_error display a command error
Method message Undocumented
Method get_logger Get a logger object.
Method _get_short_description Undocumented
Method _get_full_description Undocumented
Method _get_name Undocumented
Method _create_parser Undocumented
Method _run Undocumented
def run(self, groupname, listofmembers, credopts=None, sambaopts=None, versionopts=None, H=None):
Run the command. This should be overriden by all subclasses.
API Documentation for Samba, generated by pydoctor at 2011-12-08 20:23:28.