class cmd_dbcheck(Command):
- """check local AD database for errors"""
+ """Check local AD database for errors."""
synopsis = "%prog [<DN>] [options]"
takes_optiongroups = {
class cmd_delegation_add_service(Command):
- """Add a service principal as msDS-AllowedToDelegateTo"""
+ """Add a service principal as msDS-AllowedToDelegateTo."""
synopsis = "%prog <accountname> <principal> [options]"
class cmd_delegation_del_service(Command):
- """Delete a service principal as msDS-AllowedToDelegateTo"""
+ """Delete a service principal as msDS-AllowedToDelegateTo."""
synopsis = "%prog <accountname> <principal> [options]"
class cmd_serverinfo(Command):
- """Query for Server information"""
+ """Query for Server information."""
synopsis = '%prog <server> [options]'
class cmd_zoneinfo(Command):
- """Query for zone information"""
+ """Query for zone information."""
synopsis = '%prog <server> <zone> [options]'
class cmd_zonelist(Command):
- """Query for zones"""
+ """Query for zones."""
synopsis = '%prog <server> [options]'
class cmd_zonecreate(Command):
- """Create a zone"""
+ """Create a zone."""
synopsis = '%prog <server> <zone> [options]'
class cmd_zonedelete(Command):
- """Delete a zone"""
+ """Delete a zone."""
synopsis = '%prog <server> <zone> [options]'
class cmd_roothints(Command):
- """Query root hints"""
+ """Query root hints."""
synopsis = '%prog <server> [<name>] [options]'
class cmd_dns(SuperCommand):
- """Domain Name Service (DNS) management"""
+ """Domain Name Service (DNS) management."""
subcommands = {}
subcommands['serverinfo'] = cmd_serverinfo()
try:
import samba.dckeytab
class cmd_domain_export_keytab(Command):
- """Dumps kerberos keys of the domain into a keytab"""
+ """Dump Kerberos keys of the domain into a keytab."""
synopsis = "%prog <keytab> [options]"
class cmd_domain_info(Command):
- """Print basic info about a domain and the DC passed as parameter"""
+ """Print basic info about a domain and the DC passed as parameter."""
synopsis = "%prog <ip_address> [options]"
result.report_logger(self.logger)
def _get_nameserver_ip(self):
- """Grab the nameserver IP address from /etc/resolv.conf"""
+ """Grab the nameserver IP address from /etc/resolv.conf."""
from os import path
RESOLV_CONF="/etc/resolv.conf"
class cmd_domain_dcpromo(Command):
- """Promotes an existing domain member or NT4 PDC to an AD DC"""
+ """Promote an existing domain member or NT4 PDC to an AD DC."""
synopsis = "%prog <dnsdomain> [DC|RODC] [options]"
class cmd_domain_join(Command):
- """Joins domain as either member or backup domain controller"""
+ """Join domain as either member or backup domain controller."""
synopsis = "%prog <dnsdomain> [DC|RODC|MEMBER|SUBDOMAIN] [options]"
class cmd_domain_demote(Command):
- """Demote ourselves from the role of Domain Controller"""
+ """Demote ourselves from the role of Domain Controller."""
synopsis = "%prog [options]"
class cmd_domain_level(Command):
- """Raises domain and forest function levels"""
+ """Raise domain and forest function levels."""
synopsis = "%prog (show|raise <options>) [options]"
class cmd_domain_passwordsettings(Command):
- """Sets password settings
+ """Set password settings.
Password complexity, history length, minimum password length, the minimum
and maximum password age) on a Samba4 server.
class cmd_drs_showrepl(Command):
- """show replication status"""
+ """Show replication status."""
synopsis = "%prog [<DC>] [options]"
class cmd_drs_kcc(Command):
- """trigger knowledge consistency center run"""
+ """Trigger knowledge consistency center run."""
synopsis = "%prog [<DC>] [options]"
class cmd_drs_replicate(Command):
- """replicate a naming context between two DCs"""
+ """Replicate a naming context between two DCs."""
synopsis = "%prog <destinationDC> <sourceDC> <NC> [options]"
class cmd_drs_bind(Command):
- """show DRS capabilities of a server"""
+ """Show DRS capabilities of a server."""
synopsis = "%prog [<DC>] [options]"
class cmd_drs_options(Command):
- """query or change 'options' for NTDS Settings object of a domain controller"""
+ """Query or change 'options' for NTDS Settings object of a Domain Controller."""
synopsis = "%prog [<DC>] [options]"
class cmd_dsacl_set(Command):
- """Modify access list on a directory object"""
+ """Modify access list on a directory object."""
synopsis = "%prog [options]"
car_help = """ The access control right to allow or deny """
class cmd_fsmo_seize(Command):
- """Seize the role"""
+ """Seize the role."""
synopsis = "%prog [options]"
class cmd_fsmo_show(Command):
- """Show the roles"""
+ """Show the roles."""
synopsis = "%prog [options]"
class cmd_fsmo_transfer(Command):
- """Transfer the role"""
+ """Transfer the role."""
synopsis = "%prog [options]"
class cmd_listall(Command):
- """list all GPOs"""
+ """List all GPOs."""
synopsis = "%prog [options]"
class cmd_list(Command):
- """list GPOs for an account"""
+ """List GPOs for an account."""
synopsis = "%prog <username> [options]"
class cmd_show(Command):
- """Show information for a GPO"""
+ """Show information for a GPO."""
synopsis = "%prog <gpo> [options]"
class cmd_getlink(Command):
- """List GPO Links for a container"""
+ """List GPO Links for a container."""
synopsis = "%prog <container_dn> [options]"
class cmd_setlink(Command):
- """Add or Update a GPO link to a container"""
+ """Add or update a GPO link to a container."""
synopsis = "%prog <container_dn> <gpo> [options]"
class cmd_dellink(Command):
- """Delete GPO link from a container"""
+ """Delete GPO link from a container."""
synopsis = "%prog <container_dn> <gpo> [options]"
class cmd_listcontainers(Command):
- """List all linked containers for a GPO"""
+ """List all linked containers for a GPO."""
synopsis = "%prog <gpo> [options]"
class cmd_getinheritance(Command):
- """Get inheritance flag for a container"""
+ """Get inheritance flag for a container."""
synopsis = "%prog <container_dn> [options]"
class cmd_setinheritance(Command):
- """Set inheritance flag on a container"""
+ """Set inheritance flag on a container."""
synopsis = "%prog <container_dn> <block|inherit> [options]"
class cmd_fetch(Command):
- """Download a GPO"""
+ """Download a GPO."""
synopsis = "%prog <gpo> [options]"
class cmd_create(Command):
- """Create an empty GPO"""
+ """Create an empty GPO."""
synopsis = "%prog <displayname> [options]"
class cmd_del(Command):
- """Delete GPO"""
+ """Delete a GPO."""
synopsis = "%prog <gpo> [options]"
class cmd_group_add(Command):
- """Creates a new AD group
+ """Creates a new AD group.
This command creates a new Active Directory group. The groupname specified on the command is a unique sAMAccountName.
class cmd_group_delete(Command):
- """Deletes an AD group
+ """Deletes an AD group.
The command deletes an existing AD group from the Active Directory domain. The groupname specified on the command is the sAMAccountName.
class cmd_group_add_members(Command):
- """Add members to an AD group
+ """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.
class cmd_group_remove_members(Command):
- """Remove members from an AD group
+ """Remove members from an AD group.
This command removes one or more members from 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 that is a member of the group specified on the command.
class cmd_group_list(Command):
- """List all groups"""
+ """List all groups."""
synopsis = "%prog [options]"
class cmd_group_list_members(Command):
- """List all members of an AD group
+ """List all members of an AD group.
This command lists members from an existing Active Directory group. The command accepts one group name.
class cmd_ntacl_set(Command):
- """Set ACLs on a file"""
+ """Set ACLs on a file."""
synopsis = "%prog <acl> <file> [options]"
class cmd_ntacl_get(Command):
- """Get ACLs of a file"""
+ """Get ACLs of a file."""
synopsis = "%prog <file> [options]"
takes_optiongroups = {
class cmd_ntacl_sysvolreset(Command):
- """Reset sysvol ACLs to defaults (including correct ACLs on GPOs)"""
+ """Reset sysvol ACLs to defaults (including correct ACLs on GPOs)."""
synopsis = "%prog <file> [options]"
takes_optiongroups = {
lp, use_ntvfs=use_ntvfs)
class cmd_ntacl_sysvolcheck(Command):
- """Check sysvol ACLs match defaults (including correct ACLs on GPOs)"""
+ """Check sysvol ACLs match defaults (including correct ACLs on GPOs)."""
synopsis = "%prog <file> [options]"
takes_optiongroups = {
class cmd_rodc_preload(Command):
- """Preload one account for an RODC"""
+ """Preload one account for an RODC."""
synopsis = "%prog (<SID>|<DN>|<accountname>) [options]"
class cmd_sites_create(Command):
- """Create a new site"""
+ """Create a new site."""
synopsis = "%prog <site> [options]"
self.outf.write("Site %s created !\n" % sitename)
class cmd_sites_delete(Command):
- """Delete an existing site"""
+ """Delete an existing site."""
synopsis = "%prog <site> [options]"
class cmd_user_create(Command):
- """Creates a new user
+ """Create a new user.
This command creates a new user account in the Active Directory domain. The username specified on the command is the sAMaccountName.
class cmd_user_delete(Command):
- """Deletes a user
+ """Delete a user.
This command deletes a user account from the Active Directory domain. The username specified on the command is the sAMAccountName.
class cmd_user_list(Command):
- """List all users"""
+ """List all users."""
synopsis = "%prog [options]"
class cmd_user_enable(Command):
- """Enables a user
+ """Enable an 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.
class cmd_user_disable(Command):
- """Disable a user"""
+ """Disable an user."""
synopsis = "%prog (<username>|--filter <filter>) [options]"
class cmd_user_setexpiry(Command):
- """Sets the expiration of a user account
+ """Set the expiration of a user account.
This command sets the expiration of a user account. The username specified on the command is the sAMAccountName. The username may also be specified using the --filter option.
class cmd_user_password(Command):
- """Change password for a user account (the one provided in authentication)
+ """Change password for a user account (the one provided in authentication).
"""
synopsis = "%prog [options]"
class cmd_user_setpassword(Command):
- """Sets or resets the password of a user account
+ """Set or reset the password of a user account.
This command sets or resets the logon password for a user account. The username specified on the command is the sAMAccountName. The username may also be specified using the --filter option.