Blame doc/adcli.xml

Packit 8586cb
Packit 8586cb
Packit Service 139908
	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
Packit Service 139908
[
Packit Service 139908
	
Packit Service 139908
]>
Packit 8586cb
Packit 8586cb
<refentry id="adcli">
Packit 8586cb
Packit 8586cb
<refentryinfo>
Packit 8586cb
	<title>adcli</title>
Packit 8586cb
	<productname>realmd</productname>
Packit 8586cb
	<authorgroup>
Packit 8586cb
		<author>
Packit 8586cb
			<contrib>Maintainer</contrib>
Packit 8586cb
			<firstname>Stef</firstname>
Packit 8586cb
			<surname>Walter</surname>
Packit 8586cb
			<email>stefw@redhat.com</email>
Packit 8586cb
		</author>
Packit 8586cb
	</authorgroup>
Packit 8586cb
</refentryinfo>
Packit 8586cb
Packit 8586cb
<refmeta>
Packit 8586cb
	<refentrytitle>adcli</refentrytitle>
Packit 8586cb
	<manvolnum>8</manvolnum>
Packit 8586cb
	<refmiscinfo class="manual">System Commands</refmiscinfo>
Packit 8586cb
</refmeta>
Packit 8586cb
Packit 8586cb
<refnamediv>
Packit 8586cb
	<refname>adcli</refname>
Packit 8586cb
	<refpurpose>Tool for performing actions on an Active Directory domain</refpurpose>
Packit 8586cb
</refnamediv>
Packit 8586cb
Packit 8586cb
<refsynopsisdiv>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli info</command>
Packit 8586cb
		<arg choice="plain">domain.example.com</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli join</command>
Packit 8586cb
		<arg choice="plain">domain.example.com</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli update</command>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli create-user</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli delete-user</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli create-group</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli delete-group</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli add-member</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">group</arg>
Packit 8586cb
		<arg choice="plain" rep="repeat">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli remove-member</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">group</arg>
Packit 8586cb
		<arg choice="plain" rep="repeat">user</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli preset-computer</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain" rep="repeat">computer</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli reset-computer</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">computer</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
	<cmdsynopsis>
Packit 8586cb
		<command>adcli delete-computer</command>
Packit 8586cb
		<arg choice="opt">--domain=domain.example.com</arg>
Packit 8586cb
		<arg choice="plain">computer</arg>
Packit 8586cb
	</cmdsynopsis>
Packit 8586cb
</refsynopsisdiv>
Packit 8586cb
Packit 8586cb
<refsect1 id='general_overview'>
Packit 8586cb
	<title>General Overview</title>
Packit 8586cb
	<para><command>adcli</command> is a command line tool that
Packit 8586cb
	can perform actions in an Active Directory domain. Among other things
Packit 8586cb
	it can be used to join a computer to a domain.</para>
Packit 8586cb
Packit 8586cb
	<para>See the various sub commands below. The following global options
Packit 8586cb
	can be used:</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-D, --domain=<parameter>domain</parameter></option></term>
Packit 8586cb
			<listitem><para>The domain to connect to. If a domain is
Packit Service 711f63
			not specified, then the domain part of the local computer's
Packit 8586cb
			host name is used.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-R, --domain-realm=<parameter>REALM</parameter></option></term>
Packit 8586cb
			<listitem><para>Kerberos realm for the domain. If not
Packit Service 711f63
			specified, then the upper cased domain name is
Packit 8586cb
			used.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-S, --domain-controller=<parameter>server</parameter></option></term>
Packit 8586cb
			<listitem><para>Connect to a specific domain controller.
Packit Service 711f63
			If not specified, then an appropriate domain controller
Packit 8586cb
			is automatically discovered.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit Service 96c226
			<term><option>-C, --login-ccache=<parameter>ccache_name</parameter></option></term>
Packit 8586cb
			<listitem><para>Use the specified kerberos credential
Packit Service 96c226
                        cache to authenticate with the domain. If no credential
Packit Service 96c226
                        cache is specified, the default kerberos credential
Packit Service 96c226
                        cache will be used. Credential caches of type FILE can
Packit Service 96c226
                        be given with the path to the file. For other
Packit Service 96c226
                        credential cache types, e.g. DIR, KEYRING or KCM, the
Packit Service 96c226
                        type must be specified explicitly together with a
Packit Service 96c226
                        suitable identifier.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-U, --login-user=<parameter>User</parameter></option></term>
Packit 8586cb
			<listitem><para>Use the specified user account to
Packit Service 711f63
			authenticate with the domain. If not specified, then
Packit 8586cb
			the name 'Administrator' will be used.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--no-password</option></term>
Packit 8586cb
			<listitem><para>Don't show prompts for or read a
Packit 8586cb
			password from input.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-W, --prompt-password</option></term>
Packit 8586cb
			<listitem><para>Prompt for a password if necessary.
Packit 8586cb
			This is the default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--stdin-password</option></term>
Packit 8586cb
			<listitem><para>Read a password from stdin input instead
Packit 8586cb
			of prompting for a password.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-v, --verbose</option></term>
Packit 8586cb
			<listitem><para>Run in verbose mode with debug
Packit 8586cb
			output.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='querying'>
Packit 8586cb
	<title>Querying Domain Information</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli info</command> displays discovered information
Packit 8586cb
	about an Active Directory domain or an Active Directory domain
Packit 8586cb
	controller.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli info domain.example.com
Packit 8586cb
...
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli info --domain-controller=dc.domain.example.com
Packit 8586cb
...
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para><command>adcli info</command> will output as much information as
Packit 8586cb
	it can about the domain. The information is designed to be both machine
Packit 8586cb
	and human readable. The command will exit with a non-zero exit code
Packit Service 711f63
	if the domain does not exist or cannot be reached.</para>
Packit 8586cb
Packit 8586cb
	<para>To show domain info for a specific domain controller use the
Packit 8586cb
	<option>--domain-controller</option> option to specify which domain
Packit 8586cb
	controller to query.</para>
Packit 8586cb
Packit 8586cb
	<para>Use the <option>--verbose</option> option to show details of how
Packit 8586cb
	the domain is discovered and queried. Many of the global options, in
Packit 8586cb
	particular authentication options, are not usable with the
Packit 8586cb
	<command>adcli info</command> command.</para>
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='joining'>
Packit 8586cb
	<title>Joining the Local Machine to a Domain</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli join</command> creates a computer account in the
Packit 8586cb
	domain for the local machine, and sets up a keytab for the machine.
Packit 8586cb
	It does not configure an authentication service (such as
Packit 8586cb
	<command>sssd</command>).</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli join domain.example.com
Packit 8586cb
Password for Administrator:
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how this operation is done.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-N, --computer-name=<parameter>computer</parameter></option></term>
Packit 8586cb
			<listitem><para>The short non-dotted name of the computer
Packit Service 711f63
			account that will be created in the domain. If not specified,
Packit 8586cb
			then the first portion of the <option>--host-fqdn</option>
Packit 8586cb
			is used.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-O, --domain-ou=<parameter>OU=xxx</parameter></option></term>
Packit 8586cb
			<listitem><para>The full distinguished name of the OU in
Packit Service 711f63
			which to create the computer account. If not specified,
Packit 8586cb
			then the computer account will be created in a default
Packit 8586cb
			location.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-H, --host-fqdn=<parameter>host</parameter></option></term>
Packit 8586cb
			<listitem><para>Override the local machine's fully qualified
Packit Service 711f63
			domain name. If not specified, the local machine's hostname
Packit Service 4f36f9
			will be retrieved via <function>gethostname()</function>.
Packit Service 4f36f9
			If <function>gethostname()</function> only returns a short name
Packit Service 4f36f9
			<function>getaddrinfo()</function> with the AI_CANONNAME hint
Packit Service 4f36f9
			is called to expand the name to a fully qualified domain
Packit Service 4f36f9
			name.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-K, --host-keytab=<parameter>/path/to/keytab</parameter></option></term>
Packit 8586cb
			<listitem><para>Specify the path to the host keytab where
Packit 8586cb
			host credentials will be written after a successful join
Packit Service 711f63
			operation. If not specified, the default location will be
Packit 8586cb
			used, usually <filename>/etc/krb5.keytab</filename>.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--login-type=<parameter>{computer|user}</parameter></option></term>
Packit 8586cb
			<listitem><para>Specify the type of authentication that
Packit 8586cb
			will be performed before creating the machine account in
Packit Service 711f63
			the domain. If set to 'computer', then the computer must
Packit 8586cb
			already have a preset account in the domain. If not
Packit 8586cb
			specified and none of the other <option>--login-xxx</option>
Packit 8586cb
			arguments have been specified, then will try both
Packit 8586cb
			'computer' and 'user' authentication.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-name=<parameter>name</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system name on the computer
Packit 8586cb
			account. The default depends on where adcli was  built, but
Packit 8586cb
			is usually something like 'linux-gnu'.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-service-pack=<parameter>pack</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system service pack on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-version=<parameter>version</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system version on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--service-name=<parameter>service</parameter></option></term>
Packit 8586cb
			<listitem><para>Additional service name for a kerberos
Packit 8586cb
			principal to be created on the computer account. This
Packit 8586cb
			option may be specified multiple times.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--user-principal=<parameter>host/name@REALM</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the userPrincipalName field of the
Packit 8586cb
			computer account to this kerberos principal. If you omit
Packit 8586cb
			the value for this option, then a principal will be set
Packit 8586cb
			in the form of host/host.example.com@REALM</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--one-time-password</option></term>
Packit 8586cb
			<listitem><para>Specify a one time password for a preset
Packit 8586cb
			computer account. This is equivalent to using
Packit 8586cb
			<option>--login-type=computer</option> and providing a
Packit 8586cb
			password as input.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit Service 1ad03b
			<term><option>--trusted-for-delegation=<parameter>yes|no|true|false</parameter></option></term>
Packit Service 1ad03b
			<listitem><para>Set or unset the TRUSTED_FOR_DELEGATION
Packit Service 1ad03b
			flag in the userAccountControl attribute to allow or
Packit Service 1ad03b
			not allow that Kerberos tickets can be forwarded to the
Packit Service 1ad03b
			host.</para></listitem>
Packit Service 1ad03b
		</varlistentry>
Packit Service 1ad03b
		<varlistentry>
Packit Service 19ef37
			<term><option>--add-service-principal=<parameter>service/hostname</parameter></option></term>
Packit Service 19ef37
			<listitem><para>Add a service principal name. In
Packit Service 19ef37
			contrast to the <option>--service-name</option> the
Packit Service 19ef37
			hostname part can be specified as well in case the
Packit Service 19ef37
			service should be accessible with a different host
Packit Service 19ef37
			name as well.</para></listitem>
Packit Service 19ef37
		</varlistentry>
Packit Service 19ef37
		<varlistentry>
Packit 8586cb
			<term><option>--show-details</option></term>
Packit 8586cb
			<listitem><para>After a successful join print out information
Packit 8586cb
			about join operation. This is output in a format that should
Packit 8586cb
			be both human and machine readable.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--show-password</option></term>
Packit 8586cb
			<listitem><para>After a successful join print out the computer
Packit 8586cb
			machine account password. This is output in a format that should
Packit 8586cb
			be both human and machine readable.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit Service 5039fa
		<varlistentry>
Packit Service 5039fa
			<term><option>--add-samba-data</option></term>
Packit Service 5039fa
			<listitem><para>After a successful join add the domain
Packit Service 5039fa
			SID and the machine account password to the Samba
Packit Service 5039fa
			specific databases by calling Samba's
Packit Service 5039fa
			<command>net</command> utility.</para>
Packit Service 5039fa
Packit Service 5039fa
			<para>Please note that Samba's <command>net</command>
Packit Service 5039fa
			requires some settings in <filename>smb.conf</filename>
Packit Service 5039fa
			to create the database entries correctly. Most
Packit Service 5039fa
			important here is currently the
Packit Service 5039fa
			<option>workgroup</option> option, see
Packit Service 5039fa
			<citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
Packit Service 5039fa
			for details.</para></listitem>
Packit Service 5039fa
		</varlistentry>
Packit Service 139908
		<varlistentry>
Packit Service 139908
			<term><option>--samba-data-tool=<parameter>/path/to/net</parameter></option></term>
Packit Service 139908
			<listitem><para>If Samba's <command>net</command>
Packit Service 139908
			cannot be found at
Packit Service 711f63
			<filename>&samba_data_tool;</filename>, this option can
Packit Service 139908
			be used to specific an alternative location with the
Packit Service 139908
			help of an absolute path.</para></listitem>
Packit Service 139908
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='updating'>
Packit 8586cb
	<title>Updating the machine account password and other attributes</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli update</command> updates the password of the computer
Packit 8586cb
	account on the domain controller for the local machine, write the new
Packit 8586cb
	keys to the keytab and removes older keys. It keeps the previous key on purpose
Packit 8586cb
	because AD will need some time to replicate the new key to all DCs hence the
Packit 8586cb
	previous key might still be used.
Packit 8586cb
	</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli update
Packit 8586cb
</programlisting>
Packit 8586cb
Packit Service 711f63
	<para>If used with a credential cache, other attributes of the computer
Packit 8586cb
	account can be changed as well if the principal has sufficient
Packit 8586cb
	privileges.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ kinit Administrator
Packit 8586cb
$ adcli update --login-ccache=/tmp/krbcc_123
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how this operation is done.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-N, --computer-name=<parameter>computer</parameter></option></term>
Packit 8586cb
			<listitem><para>The short non-dotted name of the computer
Packit Service 711f63
			account that will be created in the domain. If not specified,
Packit 8586cb
			it will be retrieved from the keytab entries.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-H, --host-fqdn=<parameter>host</parameter></option></term>
Packit 8586cb
			<listitem><para>The local machine's fully qualified
Packit Service 711f63
			domain name. If not specified, the local machine's hostname
Packit 8586cb
			will be retrieved from the keytab entries.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-K, --host-keytab=<parameter>/path/to/keytab</parameter></option></term>
Packit 8586cb
			<listitem><para>Specify the path to the host keytab where
Packit 8586cb
			current host credentials are stored and the new ones
Packit Service 711f63
			will be written to.  If not specified, the default
Packit 8586cb
			location will be used, usually
Packit 8586cb
			<filename>/etc/krb5.keytab</filename>.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-name=<parameter>name</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system name on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-service-pack=<parameter>pack</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system service pack on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-version=<parameter>version</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system version on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--service-name=<parameter>service</parameter></option></term>
Packit 8586cb
			<listitem><para>Additional service name for a Kerberos
Packit 8586cb
			principal to be created on the computer account. This
Packit 8586cb
			option may be specified multiple times.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--user-principal=<parameter>host/name@REALM</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the userPrincipalName field of the
Packit 8586cb
			computer account to this Kerberos principal.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--computer-password-lifetime=<parameter>lifetime</parameter></option></term>
Packit 8586cb
			<listitem><para>Only update the password of the
Packit 8586cb
			computer account if it is older than the lifetime given
Packit 8586cb
			in days. By default the password is updated if it is
Packit 8586cb
			older than 30 days.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit Service 1ad03b
			<term><option>--trusted-for-delegation=<parameter>yes|no|true|false</parameter></option></term>
Packit Service 1ad03b
			<listitem><para>Set or unset the TRUSTED_FOR_DELEGATION
Packit Service 1ad03b
			flag in the userAccountControl attribute to allow or
Packit Service 1ad03b
			not allow that Kerberos tickets can be forwarded to the
Packit Service 1ad03b
			host.</para></listitem>
Packit Service 1ad03b
		</varlistentry>
Packit Service 1ad03b
		<varlistentry>
Packit Service 19ef37
			<term><option>--add-service-principal=<parameter>service/hostname</parameter></option></term>
Packit Service 19ef37
			<listitem><para>Add a service principal name. In
Packit Service 19ef37
			contrast to the <option>--service-name</option> the
Packit Service 19ef37
			hostname part can be specified as well in case the
Packit Service 19ef37
			service should be accessible with a different host
Packit Service 19ef37
			name as well.</para></listitem>
Packit Service 19ef37
		</varlistentry>
Packit Service 19ef37
		<varlistentry>
Packit Service 19ef37
			<term><option>--remove-service-principal=<parameter>service/hostname</parameter></option></term>
Packit Service 19ef37
			<listitem><para>Remove a service principal name from
Packit Service 19ef37
			the keytab and the AD host object.</para></listitem>
Packit Service 19ef37
		</varlistentry>
Packit Service 19ef37
		<varlistentry>
Packit 8586cb
			<term><option>--show-details</option></term>
Packit 8586cb
			<listitem><para>After a successful join print out information
Packit 8586cb
			about join operation. This is output in a format that should
Packit 8586cb
			be both human and machine readable.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit Service 5039fa
		<varlistentry>
Packit Service 5039fa
			<term><option>--add-samba-data</option></term>
Packit Service 5039fa
			<listitem><para>After a successful join add the domain
Packit Service 5039fa
			SID and the machine account password to the Samba
Packit Service 5039fa
			specific databases by calling Samba's
Packit Service 5039fa
			<command>net</command> utility.</para>
Packit Service 5039fa
Packit Service 5039fa
			<para>Please note that Samba's <command>net</command>
Packit Service 5039fa
			requires some settings in <filename>smb.conf</filename>
Packit Service 5039fa
			to create the database entries correctly. Most
Packit Service 5039fa
			important here is currently the
Packit Service 5039fa
			<option>workgroup</option> option, see
Packit Service 5039fa
			<citerefentry><refentrytitle>smb.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
Packit Service 5039fa
			for details.</para></listitem>
Packit Service 5039fa
		</varlistentry>
Packit Service 139908
		<varlistentry>
Packit Service 139908
			<term><option>--samba-data-tool=<parameter>/path/to/net</parameter></option></term>
Packit Service 139908
			<listitem><para>If Samba's <command>net</command>
Packit Service 139908
			cannot be found at
Packit Service 711f63
			<filename>&samba_data_tool;</filename>, this option can
Packit Service 139908
			be used to specific an alternative location with the
Packit Service 139908
			help of an absolute path.</para></listitem>
Packit Service 139908
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit e09d58
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='create_user'>
Packit 8586cb
	<title>Creating a User</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli create-user</command> creates a new user account
Packit 8586cb
	in the domain.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli create-user Fry --domain=domain.example.com \
Packit 8586cb
	--display-name="Philip J. Fry" --mail=fry@domain.example.com
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how the user is created.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--display-name=<parameter>"Name"</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the displayName attribute
Packit 8586cb
			of the new created user account.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-O, --domain-ou=<parameter>OU=xxx</parameter></option></term>
Packit 8586cb
			<listitem><para>The full distinguished name of the OU in
Packit Service 711f63
			which to create the user account. If not specified,
Packit 8586cb
			then the computer account will be created in a default
Packit 8586cb
			location.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--mail=<parameter>email@domain.com</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the mail attribute of
Packit 8586cb
			the new created user account. This attribute may be
Packit 8586cb
			specified multiple times.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--unix-home=<parameter>/home/user</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the unixHomeDirectory attribute of
Packit 8586cb
			the new created user account, which should be an absolute
Packit 8586cb
			path to the user's home directory.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--unix-gid=<parameter>111</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the gidNumber attribute of
Packit 8586cb
			the new created user account, which should be the user's
Packit 8586cb
			numeric primary group id.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--unix-shell=<parameter>/bin/shell</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the loginShell attribute of
Packit 8586cb
			the new created user account, which should be a path to
Packit 8586cb
			a valid shell.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--unix-uid=<parameter>111</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the uidNumber attribute of
Packit 8586cb
			the new created user account, which should be the user's
Packit 8586cb
			numeric primary user id.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit Service b20e2f
		<varlistentry>
Packit Service b20e2f
			<term><option>--nis-domain=<parameter>nis_domain</parameter></option></term>
Packit Service b20e2f
			<listitem><para>Set the msSFU30NisDomain attribute of
Packit Service b20e2f
			the new created user account, which should be the user's
Packit Service b20e2f
			NIS domain is the NIS/YP service of Active Directory's Services for Unix (SFU)
Packit Service b20e2f
			are used. This is needed to let the 'UNIX attributes' tab of older Active
Packit Service 0764e0
			Directoy versions show the set UNIX specific attributes. If not specified
Packit Service 0764e0
			adcli will try to determine the NIS domain automatically if needed.
Packit Service 0764e0
			</para></listitem>
Packit Service b20e2f
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='delete_user'>
Packit 8586cb
	<title>Deleting a User</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli delete-user</command> deletes a user account from
Packit 8586cb
	the domain.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli delete-user Fry --domain=domain.example.com
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>The various global options can be used.</para>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
Packit 8586cb
<refsect1 id='create_group'>
Packit 8586cb
	<title>Creating a Group</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli create-group</command> creates a new group in the
Packit 8586cb
	domain.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli create-group Pilots --domain=domain.example.com \
Packit 8586cb
	--description="Group for all pilots"
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how the group is created.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--description=<parameter>"text"</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the description attribute
Packit 8586cb
			of the new created group.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-O, --domain-ou=<parameter>OU=xxx</parameter></option></term>
Packit 8586cb
			<listitem><para>The full distinguished name of the OU in
Packit Service 711f63
			which to create the group. If not specified,
Packit 8586cb
			then the group will be created in a default
Packit 8586cb
			location.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='delete_group'>
Packit 8586cb
	<title>Deleting a Group</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli delete-group</command> deletes a group from
Packit 8586cb
	the domain.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli delete-group Pilots --domain=domain.example.com
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>The various global options can be used.</para>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='add_group_member'>
Packit 8586cb
	<title>Adding a Member to a Group</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli add-member</command> adds one or more users to a
Packit 8586cb
	group in the domain. The group is specified first, and then the various
Packit 8586cb
	users to be added.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli add-member --domain=domain.example.com Pilots Leela Scruffy
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>The various global options can be used.</para>
Packit 8586cb
Packit 8586cb
	<para></para>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='remove_group_member'>
Packit 8586cb
	<title>Removing a Member from a Group</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli remove-member</command> removes a user from  a group
Packit 8586cb
	in the domain. The group is specified first, and then the various users
Packit 8586cb
	to be removed.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli remove-member --domain=domain.example.com Pilots Scruffy
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>The various global options can be used.</para>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='preset_computer_account'>
Packit 8586cb
	<title>Preset Computer Accounts</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli preset-computer</command> pre-creates one or more
Packit 8586cb
	computer accounts in the domain for machines to later use when joining
Packit 8586cb
	the domain. By doing this machines can join using a one time password
Packit 8586cb
	or automatically without a password.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli preset-computer --domain=domain.example.com \
Packit 8586cb
	host1.example.com host2
Packit 8586cb
Password for Administrator:
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>If the computer names specified contain dots, then they are
Packit 8586cb
	treated as fully qualified host names, otherwise they are treated
Packit 8586cb
	as short computer names. The computer accounts must not already
Packit 8586cb
	exist.</para>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how this operation is done.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>-O, --domain-ou=<parameter>OU=xxx</parameter></option></term>
Packit 8586cb
			<listitem><para>The full distinguished name of the OU in
Packit Service 711f63
			which to create the computer accounts. If not specified,
Packit 8586cb
			then the computer account will be created in a default
Packit 8586cb
			location.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--one-time-password</option></term>
Packit 8586cb
			<listitem><para>Specify a one time password to use when
Packit Service 711f63
			presetting the computer accounts. If not specified, then
Packit 8586cb
			a default password will be used, which allows for later
Packit 8586cb
			automatic joins.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-name=<parameter>name</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system name on the computer
Packit 8586cb
			account. The default depends on where adcli was  built, but
Packit 8586cb
			is usually something like 'linux-gnu'.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-service-pack=<parameter>pack</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system service pack on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--os-version=<parameter>version</parameter></option></term>
Packit 8586cb
			<listitem><para>Set the operating system version on the computer
Packit 8586cb
			account. Not set by default.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--service-name=<parameter>service</parameter></option></term>
Packit 8586cb
			<listitem><para>Additional service name for a kerberos
Packit 8586cb
			principal to be created on the computer account. This
Packit 8586cb
			option may be specified multiple times.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--user-principal</option></term>
Packit 8586cb
			<listitem><para>Set the userPrincipalName field of the
Packit 8586cb
			computer account to this kerberos principal in the form
Packit 8586cb
			of host/host.example.com@REALM</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='reset_computer_account'>
Packit 8586cb
	<title>Reset Computer Account</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli reset-computer</command> resets a computer account
Packit Service 711f63
	in the domain. If the appropriate machine is currently joined to the
Packit 8586cb
	domain, then its membership will be broken. The account must already
Packit 8586cb
	exist.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli reset-computer --domain=domain.example.com host2
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>If the computer names specified contain dots, then they are
Packit 8586cb
	treated as fully qualified host names, otherwise they are treated
Packit 8586cb
	as short computer names.</para>
Packit 8586cb
Packit 8586cb
	<para>In addition to the global options, you can specify the following
Packit 8586cb
	options to control how this operation is done.</para>
Packit 8586cb
Packit 8586cb
	<variablelist>
Packit 8586cb
		<varlistentry>
Packit 8586cb
			<term><option>--login-type=<parameter>{computer|user}</parameter></option></term>
Packit 8586cb
			<listitem><para>Specify the type of authentication that
Packit 8586cb
			will be performed before creating the machine account in
Packit Service 711f63
			the domain. If set to 'computer', then the computer must
Packit 8586cb
			already have a preset account in the domain. If not
Packit 8586cb
			specified and none of the other <option>--login-xxx</option>
Packit 8586cb
			arguments have been specified, then will try both
Packit 8586cb
			'computer' and 'user' authentication.</para></listitem>
Packit 8586cb
		</varlistentry>
Packit 8586cb
	</variablelist>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='delete_computer_account'>
Packit 8586cb
	<title>Delete Computer Account</title>
Packit 8586cb
Packit 8586cb
	<para><command>adcli delete-computer</command> deletes a computer account
Packit 8586cb
	in the domain. The account must already exist.</para>
Packit 8586cb
Packit 8586cb
<programlisting>
Packit 8586cb
$ adcli delete-computer --domain=domain.example.com host2
Packit 8586cb
Password for Administrator:
Packit 8586cb
</programlisting>
Packit 8586cb
Packit 8586cb
	<para>If the computer name contains a dot, then it is
Packit 8586cb
	treated as fully qualified host name, otherwise it is treated
Packit 8586cb
	as short computer name.</para>
Packit 8586cb
Packit 8586cb
	<para>If no computer name is specified, then the host name of the
Packit 8586cb
	computer adcli is running on is used, as returned by
Packit 8586cb
	<literal>gethostname()</literal>.</para>
Packit 8586cb
Packit 8586cb
	<para>The various global options can be used.</para>
Packit 8586cb
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='bugs'>
Packit 8586cb
	<title>Bugs</title>
Packit 8586cb
	<para>
Packit 8586cb
		Please send bug reports to either the distribution bug tracker
Packit 8586cb
		or the upstream bug tracker at
Packit 8586cb
		<ulink url="https://bugs.freedesktop.org/enter_bug.cgi?product=realmd&component=adcli">https://bugs.freedesktop.org/enter_bug.cgi?product=realmd&component=adcli</ulink>
Packit 8586cb
	</para>
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
<refsect1 id='see_also'>
Packit 8586cb
	<title>See also</title>
Packit 8586cb
	<simplelist type="inline">
Packit 8586cb
		<member><citerefentry><refentrytitle>realmd</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
Packit 8586cb
		<member><citerefentry><refentrytitle>net</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
Packit 8586cb
		<member><citerefentry><refentrytitle>sssd</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
Packit 8586cb
	</simplelist>
Packit 8586cb
	<para>
Packit 8586cb
		Further details available in the realmd online documentation at
Packit 8586cb
		<ulink url="http://www.freedesktop.org/software/realmd/">http://www.freedesktop.org/software/realmd/</ulink>
Packit 8586cb
	</para>
Packit 8586cb
</refsect1>
Packit 8586cb
Packit 8586cb
</refentry>