adcli |
---|
adcliadcli — Tool for performing actions on an Active Directory domain |
adcli info
domain.example.com
adcli join
domain.example.com
adcli create-user
[--domain=domain.example.com] user
adcli delete-user
[--domain=domain.example.com] user
adcli create-group
[--domain=domain.example.com] user
adcli delete-group
[--domain=domain.example.com] user
adcli add-member
[--domain=domain.example.com] group user...
adcli remove-member
[--domain=domain.example.com] group user...
adcli preset-computer
[--domain=domain.example.com] computer...
adcli reset-computer
[--domain=domain.example.com] computer
adcli delete-computer
[--domain=domain.example.com] computer
adcli is a command line tool that can perform actions in an Active Directory domain. Among other things it can be used to join a computer to a domain.
See the various sub commands below. The following global options can be used:
|
The domain to connect to. If a domain is not specified then the domain part of the local computer's host name is used. |
|
Kerberos realm for the domain. If not specified then the upper cased domain name is used. |
|
Connect to a specific domain controller. If not specified then an appropriate domain controller is automatically discovered. |
|
Use the specified kerberos credential cache to authenticate with the domain. |
|
Use the specified user account to authenticate with the domain. If not specified then the name 'Administrator' will be used. |
|
Don't show prompts for or read a password from input. |
|
Prompt for a password if necessary. This is the default. |
|
Read a password from stdin input instead of prompting for a password. |
|
Run in verbose mode with debug output. |
adcli info displays discovered information about an Active Directory domain or an Active Directory domain controller.
$ adcli info domain.example.com ...
$ adcli info --domain-controller=dc.domain.example.com ...
adcli info will output as much information as it can about the domain. The information is designed to be both machine and human readable. The command will exit with a non-zero exit code if the domain does note exist or cannot be reached.
To show domain info for a specific domain controller use the
--domain-controller
option to specify which domain
controller to query.
Use the --verbose
option to show details of how
the domain is discovered and queried. Many of the global options, in
particular authentication options, are not usable with the
adcli info command.
adcli join creates a computer account in the domain for the local machine, and sets up a keytab for the machine. It does not configure an authentication service (such as sssd).
$ adcli join domain.example.com Password for Administrator:
In addition to the global options, you can specify the following options to control how this operation is done.
|
The short non-dotted name of the computer
account that will be created in the domain. If not specified
then the first portion of the |
|
The full distinguished name of the OU in which to create the computer account. If not specified then the computer account will be created in a default location. |
|
Override the local machine's fully qualified
domain name. If not specified the local machine's hostname
will be retrieved via |
|
Specify the path to the host keytab where
host credentials will be written after a successful join
operation. If not specified the default location will be
used, usually |
|
Specify the type of authentication that
will be performed before creating the machine account in
the domain. If set to 'computer' then the computer must
already have a preset account in the domain. If not
specified and none of the other |
|
Set the operating system name on the computer account. The default depends on where adcli was built, but is usually something like 'linux-gnu'. |
|
Set the operating system service pack on the computer account. Not set by default. |
|
Set the operating system version on the computer account. Not set by default. |
|
Additional service name for a kerberos principal to be created on the computer account. This option may be specified multiple times. |
|
Set the userPrincipalName field of the
computer account to this kerberos principal. If you omit
the value for this option, then a principal will be set
in the form of |
|
Specify a one time password for a preset
computer account. This is equivalent to using
|
|
After a successful join print out information about join operation. This is output in a format that should be both human and machine readable. |
|
After a successful join print out the computer machine account password. This is output in a format that should be both human and machine readable. |
adcli create-user creates a new user account in the domain.
$ adcli create-user Fry --domain=domain.example.com \ --display-name="Philip J. Fry" --mail=fry@domain.example.com
In addition to the global options, you can specify the following options to control how the user is created.
|
Set the |
|
The full distinguished name of the OU in which to create the user account. If not specified then the computer account will be created in a default location. |
|
Set the |
|
Set the |
|
Set the |
|
Set the |
|
Set the |
adcli delete-user deletes a user account from the domain.
$ adcli delete-user Fry --domain=domain.example.com
The various global options can be used.
adcli create-group creates a new group in the domain.
$ adcli create-group Pilots --domain=domain.example.com \ --description="Group for all pilots"
In addition to the global options, you can specify the following options to control how the group is created.
|
Set the |
|
The full distinguished name of the OU in which to create the group. If not specified then the computer account will be created in a default location. |
adcli delete-group deletes a group from the domain.
$ adcli delete-group Pilots --domain=domain.example.com
The various global options can be used.
adcli add-member adds one or more users to a group in the domain. The group is specified first, and then the various users to be added.
$ adcli add-member --domain=domain.example.com Pilots Leela Scruffy
The various global options can be used.
adcli remove-member removes a user from a group in the domain. The group is specified first, and then the various users to be removed.
$ adcli remove-member --domain=domain.example.com Pilots Scruffy
The various global options can be used.
adcli preset-computer pre-creates one or more computer accounts in the domain for machines to later use when joining the domain. By doing this machines can join using a one time password or automatically without a password.
$ adcli preset-computer --domain=domain.example.com \ host1.example.com host2 Password for Administrator:
If the computer names specified contain dots, then they are treated as fully qualified host names, otherwise they are treated as short computer names. The computer accounts must not already exist.
In addition to the global options, you can specify the following options to control how this operation is done.
|
The full distinguished name of the OU in which to create the computer accounts. If not specified then the computer account will be created in a default location. |
|
Specify a one time password to use when presetting the computer accounts. If not specified then a default password will be used, which allows for later automatic joins. |
|
Set the operating system name on the computer account. The default depends on where adcli was built, but is usually something like 'linux-gnu'. |
|
Set the operating system service pack on the computer account. Not set by default. |
|
Set the operating system version on the computer account. Not set by default. |
|
Additional service name for a kerberos principal to be created on the computer account. This option may be specified multiple times. |
|
Set the userPrincipalName field of the
computer account to this kerberos principal in the form
of |
adcli reset-computer resets a computer account in the domain. If a the appropriate machien is currently joined to the domain, then it's membership will be broken. The account must already exist.
$ adcli reset-computer --domain=domain.example.com host2
If the computer names specified contain dots, then they are treated as fully qualified host names, otherwise they are treated as short computer names.
In addition to the global options, you can specify the following options to control how this operation is done.
|
Specify the type of authentication that
will be performed before creating the machine account in
the domain. If set to 'computer' then the computer must
already have a preset account in the domain. If not
specified and none of the other |
adcli delete-computer deletes a computer account in the domain. The account must already exist.
$ adcli delete-computer --domain=domain.example.com host2 Password for Administrator:
If the computer name contains a dot, then it is treated as fully qualified host name, otherwise it is treated as short computer name.
If no computer name is specified, then the host name of the
computer adcli is running on is used, as returned by
gethostname()
.
The various global options can be used.
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at https://bugs.freedesktop.org/enter_bug.cgi?product=realmd&component=adcli
Further details available in the realmd online documentation at http://www.freedesktop.org/software/realmd/