s.n.u.cmd_user_enable(Command) : class documentation

Part of samba.netcmd.user View In Hierarchy

Enables a user

This command enables a user account for logon to an Active Directory domain. The username specified on the command is the sAMAccountName. The username may also be specified using the --filter option.

There are many reasons why an account may become disabled. These include: - If a user exceeds the account policy for logon attempts - If an administrator disables the account - If the account expires

The samba-tool user enable command allows an administrator to enable an account which has become disabled.

Additionally, the enable function allows an administrator to have a set of created user accounts defined and setup with default permissions that can be easily enabled for use.

The command may be run from the root userid or another authorized userid. The -H or --URL= option can be used to execute the command against a remote server.

Example1: samba-tool user enable Testuser1 --URL=ldap://samba.samdom.example.com --username=administrator --password=passw1rd

Example1 shows how to enable a user in the domain against a remote LDAP server. The --URL parameter is used to specify the remote target server. The --username= and --password= options are used to pass the username and password of a user that exists on the remote server and is authorized to update that server.

Exampl2: su samba-tool user enable Testuser2

Example2 shows how to enable user Testuser2 for use in the domain on the local server. sudo is used so a user may run the command as root.

Example3: samba-tool user enable --filter=samaccountname=Testuser3

Example3 shows how to enable a user in the domain against a local LDAP server. It uses the --filter=samaccountname to specify the username.

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, username=None, sambaopts=None, credopts=None, versionopts=None, filter=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.