table of contents
- NAME
- SYNOPSIS
- GENERAL OVERVIEW
- QUERYING DOMAIN INFORMATION
- JOINING THE LOCAL MACHINE TO A DOMAIN
- UPDATING THE MACHINE ACCOUNT PASSWORD AND OTHER ATTRIBUTES
- CREATING A USER
- DELETING A USER
- CREATING A GROUP
- DELETING A GROUP
- ADDING A MEMBER TO A GROUP
- REMOVING A MEMBER FROM A GROUP
- PRESET COMPUTER ACCOUNTS
- RESET COMPUTER ACCOUNT
- DELETE COMPUTER ACCOUNT
- BUGS
- SEE ALSO
ADCLI(8) | System Commands | ADCLI(8) |
NAME¶
adcli - Tool for performing actions on an Active Directory domain
SYNOPSIS¶
adcli info domain.example.com
adcli join domain.example.com
adcli update
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
GENERAL OVERVIEW¶
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:
-D, --domain=domain
-R, --domain-realm=REALM
-S, --domain-controller=server
-C, --login-ccache=/path/to/file
-U, --login-user=User
--no-password
-W, --prompt-password
--stdin-password
-v, --verbose
QUERYING DOMAIN INFORMATION¶
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.
JOINING THE LOCAL MACHINE TO A DOMAIN¶
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.
-N, --computer-name=computer
-O, --domain-ou=OU=xxx
-H, --host-fqdn=host
-K, --host-keytab=/path/to/keytab
--login-type={computer|user}
--os-name=name
--os-service-pack=pack
--os-version=version
--service-name=service
--user-principal=host/name@REALM
--one-time-password
--show-details
--show-password
--add-samba-data
Please note that Samba´s net requires some settings in smb.conf to create the database entries correctly. Most important here is currently the workgroup option, see smb.conf(5) for details.
--samba-data-tool=/path/to/net
UPDATING THE MACHINE ACCOUNT PASSWORD AND OTHER ATTRIBUTES¶
adcli update updates the password of the computer account on the domain controller for the local machine, write the new keys to the keytab and removes older keys. It keeps the previous key on purpose because AD will need some time to replicate the new key to all DCs hence the previous key might still be used.
$ adcli update
If used with a credential cache other attributes of the computer account can be changed as well if the principal has sufficient privileges.
$ kinit Administrator $ adcli update --login-ccache=/tmp/krbcc_123
In addition to the global options, you can specify the following options to control how this operation is done.
-N, --computer-name=computer
-H, --host-fqdn=host
-K, --host-keytab=/path/to/keytab
--os-name=name
--os-service-pack=pack
--os-version=version
--service-name=service
--user-principal=host/name@REALM
--computer-password-lifetime=lifetime
--show-details
--add-samba-data
Please note that Samba´s net requires some settings in smb.conf to create the database entries correctly. Most important here is currently the workgroup option, see smb.conf(5) for details.
--samba-data-tool=/path/to/net
CREATING A USER¶
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.
--display-name="Name"
-O, --domain-ou=OU=xxx
--mail=email@domain.com
--unix-home=/home/user
--unix-gid=111
--unix-shell=/bin/shell
--unix-uid=111
DELETING A USER¶
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.
CREATING A GROUP¶
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.
--description="text"
-O, --domain-ou=OU=xxx
DELETING A GROUP¶
adcli delete-group deletes a group from the domain.
$ adcli delete-group Pilots --domain=domain.example.com
The various global options can be used.
ADDING A MEMBER TO A GROUP¶
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.
REMOVING A MEMBER FROM A GROUP¶
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.
PRESET COMPUTER ACCOUNTS¶
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.
-O, --domain-ou=OU=xxx
--one-time-password
--os-name=name
--os-service-pack=pack
--os-version=version
--service-name=service
--user-principal
RESET COMPUTER ACCOUNT¶
adcli reset-computer resets a computer account in the domain. If a the appropriate machine is currently joined to the domain, then its 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.
--login-type={computer|user}
DELETE COMPUTER ACCOUNT¶
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.
BUGS¶
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
SEE ALSO¶
Further details available in the realmd online documentation at http://www.freedesktop.org/software/realmd/
realmd |