SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 42 adcli-0.8.2-2.1.x86_64.rpm

ADCLI

Section: System Commands (8)
Updated:
Index 

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

The domain to connect to. If a domain is not specified then the domain part of the local computer's host name is used.

-R, --domain-realm=REALM

Kerberos realm for the domain. If not specified then the upper cased domain name is used.

-S, --domain-controller=server

Connect to a specific domain controller. If not specified then an appropriate domain controller is automatically discovered.

-C, --login-ccache=/path/to/file

Use the specified kerberos credential cache to authenticate with the domain. If no file is specified or-Cis used, then the default kerberos credential cache will be used.

-U, --login-user=User

Use the specified user account to authenticate with the domain. If not specified then the name 'Administrator' will be used.

--no-password

Don't show prompts for or read a password from input.

-W, --prompt-password

Prompt for a password if necessary. This is the default.

--stdin-password

Read a password from stdin input instead of prompting for a password.

-v, --verbose

Run in verbose mode with debug output.
 

QUERYING DOMAIN INFORMATION

adcli infodisplays 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 infowill 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-controlleroption to specify which domain controller to query.

Use the--verboseoption to show details of how the domain is discovered and queried. Many of the global options, in particular authentication options, are not usable with theadcli infocommand. 

JOINING THE LOCAL MACHINE TO A DOMAIN

adcli joincreates 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 assssd).

$ adcli join domain.example.comPassword 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

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--host-fqdnis used.

-O, --domain-ou=OU=xxx

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.

-H, --host-fqdn=host

Override the local machine's fully qualified domain name. If not specified the local machine's hostname will be retrieved viagethostname().

-K, --host-keytab=/path/to/keytab

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/etc/krb5.keytab.

--login-type={computer|user}

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--login-xxxarguments have been specified, then will try both 'computer' and 'user' authentication.

--os-name=name

Set the operating system name on the computer account. The default depends on where adcli was built, but is usually something like 'linux-gnu'.

--os-service-pack=pack

Set the operating system service pack on the computer account. Not set by default.

--os-version=version

Set the operating system version on the computer account. Not set by default.

--service-name=service

Additional service name for a kerberos principal to be created on the computer account. This option may be specified multiple times.

--user-principal=host/nameAATTREALM

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 ofhost/host.example.comAATTREALM

--one-time-password

Specify a one time password for a preset computer account. This is equivalent to using--login-type=computerand providing a password as input.

--show-details

After a successful join print out information about join operation. This is output in a format that should be both human and machine readable.

--show-password

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.
 

UPDATING THE MACHINE ACCOUNT PASSWORD AND OTHER ATTRIBUTES

adcli updateupdates 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

The short non-dotted name of the computer account that will be created in the domain. If not specified it will be retrieved from the keytab entries.

-H, --host-fqdn=host

The local machine's fully qualified domain name. If not specified the local machine's hostname will be retrieved from the keytab entries.

-K, --host-keytab=/path/to/keytab

Specify the path to the host keytab where current host credentials are stored and the new ones will be written to. If not specified the default location will be used, usually/etc/krb5.keytab.

--os-name=name

Set the operating system name on the computer account. Not set by default.

--os-service-pack=pack

Set the operating system service pack on the computer account. Not set by default.

--os-version=version

Set the operating system version on the computer account. Not set by default.

--service-name=service

Additional service name for a Kerberos principal to be created on the computer account. This option may be specified multiple times.

--user-principal=host/nameAATTREALM

Set the userPrincipalName field of the computer account to this Kerberos principal.

--computer-password-lifetime=lifetime

Only update the password of the computer account if it is older than the lifetime given in days. By default the password is updated if it is older than 30 days.

--show-details

After a successful join print out information about join operation. This is output in a format that should be both human and machine readable.
 

CREATING A USER

adcli create-usercreates a new user account in the domain.

$ adcli create-user Fry --domain=domain.example.com \        --display-name="Philip J. Fry" --mail=fryAATTdomain.example.com

In addition to the global options, you can specify the following options to control how the user is created.

--display-name="Name"

Set thedisplayNameattribute of the new created user account.

-O, --domain-ou=OU=xxx

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.

--mail=emailAATTdomain.com

Set themailattribute of the new created user account. This attribute may be specified multiple times.

--unix-home=/home/user

Set theunixHomeDirectoryattribute of the new created user account, which should be an absolute path to the user's home directory.

--unix-gid=111

Set thegidNumberattribute of the new created user account, which should be the user's numeric primary group id.

--unix-shell=/bin/shell

Set theloginShellattribute of the new created user account, which should be a path to a valid shell.

--unix-uid=111

Set theuidNumberattribute of the new created user account, which should be the user's numeric primary user id.
 

DELETING A USER

adcli delete-userdeletes 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-groupcreates 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"

Set thedescriptionattribute of the new created group.

-O, --domain-ou=OU=xxx

The full distinguished name of the OU in which to create the group. If not specified then the group will be created in a default location.
 

DELETING A GROUP

adcli delete-groupdeletes 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-memberadds 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-memberremoves 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-computerpre-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 host2Password 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

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.

--one-time-password

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.

--os-name=name

Set the operating system name on the computer account. The default depends on where adcli was built, but is usually something like 'linux-gnu'.

--os-service-pack=pack

Set the operating system service pack on the computer account. Not set by default.

--os-version=version

Set the operating system version on the computer account. Not set by default.

--service-name=service

Additional service name for a kerberos principal to be created on the computer account. This option may be specified multiple times.

--user-principal

Set the userPrincipalName field of the computer account to this kerberos principal in the form ofhost/host.example.comAATTREALM
 

RESET COMPUTER ACCOUNT

adcli reset-computerresets 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}

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--login-xxxarguments have been specified, then will try both 'computer' and 'user' authentication.
 

DELETE COMPUTER ACCOUNT

adcli delete-computerdeletes a computer account in the domain. The account must already exist.

$ adcli delete-computer --domain=domain.example.com host2Password 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 bygethostname().

The various global options can be used. 

BUGS

Please send bug reports to either the distribution bug tracker or the upstream bug tracker atm[blue]https://bugs.freedesktop.org/enter_bug.cgi?product=realmd&component=adclim[] 

SEE ALSO

realmd(8), net(8), sssd(8)

Further details available in the realmd online documentation atm[blue]http://www.freedesktop.org/software/realmd/m[]


 

Index

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

This document was created byman2html,using the manual pages.