summaryrefslogtreecommitdiffstats
path: root/docs/docbook/manpages/smbpasswd.8.sgml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docbook/manpages/smbpasswd.8.sgml')
-rw-r--r--docs/docbook/manpages/smbpasswd.8.sgml409
1 files changed, 251 insertions, 158 deletions
diff --git a/docs/docbook/manpages/smbpasswd.8.sgml b/docs/docbook/manpages/smbpasswd.8.sgml
index c0b7ac33591..d607fa1ca92 100644
--- a/docs/docbook/manpages/smbpasswd.8.sgml
+++ b/docs/docbook/manpages/smbpasswd.8.sgml
@@ -13,22 +13,18 @@
</refnamediv>
<refsynopsisdiv>
+ <para>When run by root:</para>
<cmdsynopsis>
<command>smbpasswd</command>
- <arg choice="opt">-a</arg>
- <arg choice="opt">-x</arg>
- <arg choice="opt">-d</arg>
- <arg choice="opt">-e</arg>
- <arg choice="opt">-D debuglevel</arg>
- <arg choice="opt">-n</arg>
- <arg choice="opt">-r &lt;remote machine&gt;</arg>
- <arg choice="opt">-R &lt;name resolve order&gt;</arg>
- <arg choice="opt">-m</arg>
- <arg choice="opt">-U username[%password]</arg>
- <arg choice="opt">-h</arg>
- <arg choice="opt">-s</arg>
- <arg choice="opt">-w pass</arg>
+ <arg choice="opt">options</arg>
<arg choice="opt">username</arg>
+ <arg choice="opt">password</arg>
+ </cmdsynopsis>
+ <para>otherwise:</para>
+ <cmdsynopsis>
+ <command>smbpasswd</command>
+ <arg choice="opt">options</arg>
+ <arg choice="opt">password</arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -55,7 +51,7 @@
UNIX machine the encrypted SMB passwords are usually stored in
the <filename>smbpasswd(5)</filename> file. </para>
- <para>When run by an ordinary user with no options, smbpasswd
+ <para>When run by an ordinary user with no options. smbpasswd
will prompt them for their old SMB password and then ask them
for their new password twice, to ensure that the new password
was typed correctly. No passwords will be echoed on the screen
@@ -79,74 +75,31 @@
<title>OPTIONS</title>
<variablelist>
<varlistentry>
- <term>-a</term>
- <listitem><para>This option specifies that the username
- following should be added to the local smbpasswd file, with the
- new password typed (type &lt;Enter&gt; for the old password). This
- option is ignored if the username following already exists in
- the smbpasswd file and it is treated like a regular change
- password command. Note that the default passdb backends require
- the user to already exist in the system password file (usually
- <filename>/etc/passwd</filename>), else the request to add the
- user will fail. </para>
-
- <para>This option is only available when running smbpasswd
- as root. </para></listitem>
+ <term>-L</term>
+ <listitem><para>Run the smbpasswd command in local mode. This
+ allows a non-root user to specify the root-only options. This
+ is used mostly in test environments where a non-root user needs
+ to make changes to the local <filename>smbpasswd</filename> file.
+ The <filename>smbpasswd</filename> file must have read/write
+ permissions for the user running the command.</para></listitem>
</varlistentry>
-
<varlistentry>
- <term>-x</term>
- <listitem><para>This option specifies that the username
- following should be deleted from the local smbpasswd file.
- </para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
+ <term>-h</term>
+ <listitem><para>This option prints the help string for
+ <command>smbpasswd</command>. </para></listitem>
</varlistentry>
-
<varlistentry>
- <term>-d</term>
- <listitem><para>This option specifies that the username following
- should be <constant>disabled</constant> in the local smbpasswd
- file. This is done by writing a <constant>'D'</constant> flag
- into the account control space in the smbpasswd file. Once this
- is done all attempts to authenticate via SMB using this username
- will fail. </para>
-
- <para>If the smbpasswd file is in the 'old' format (pre-Samba 2.0
- format) there is no space in the user's password entry to write
- this information and the command will FAIL. See <command>smbpasswd(5)
- </command> for details on the 'old' and new password file formats.
- </para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
+ <term>-c smb.conf file</term>
+ <listitem><para>This option specifies that the configuration
+ file specified should be used instead of the default value
+ specified at compile time. </para></listitem>
</varlistentry>
-
-
- <varlistentry>
- <term>-e</term>
- <listitem><para>This option specifies that the username following
- should be <constant>enabled</constant> in the local smbpasswd file,
- if the account was previously disabled. If the account was not
- disabled this option has no effect. Once the account is enabled then
- the user will be able to authenticate via SMB once again. </para>
-
- <para>If the smbpasswd file is in the 'old' format, then <command>
- smbpasswd</command> will FAIL to enable the account.
- See <command>smbpasswd (5)</command> for
- details on the 'old' and new password file formats. </para>
- <para>This option is only available when running smbpasswd as root.
- </para></listitem>
- </varlistentry>
-
-
<varlistentry>
<term>-D debuglevel</term>
<listitem><para><replaceable>debuglevel</replaceable> is an integer
@@ -165,28 +118,6 @@
</varlistentry>
-
- <varlistentry>
- <term>-n</term>
- <listitem><para>This option specifies that the username following
- should have their password set to null (i.e. a blank password) in
- the local smbpasswd file. This is done by writing the string "NO
- PASSWORD" as the first part of the first password stored in the
- smbpasswd file. </para>
-
- <para>Note that to allow users to logon to a Samba server once
- the password has been set to "NO PASSWORD" in the smbpasswd
- file the administrator must set the following parameter in the [global]
- section of the <filename>smb.conf</filename> file : </para>
-
- <para><command>null passwords = yes</command></para>
-
- <para>This option is only available when running smbpasswd as
- root.</para></listitem>
- </varlistentry>
-
-
-
<varlistentry>
<term>-r remote machine name</term>
<listitem><para>This option allows a user to specify what machine
@@ -217,94 +148,154 @@
</varlistentry>
+
<varlistentry>
- <term>-R name resolve order</term>
- <listitem><para>This option allows the user of smbpasswd to determine
- what name resolution services to use when looking up the NetBIOS
- name of the host being connected to. </para>
+ <term>-s</term>
+ <listitem><para>This option causes smbpasswd to be silent (i.e.
+ not issue prompts) and to read its old and new passwords from
+ standard input, rather than from <filename>/dev/tty</filename>
+ (like the <command>passwd(1)</command> program does). This option
+ is to aid people writing scripts to drive smbpasswd</para>
+ </listitem>
+ </varlistentry>
- <para>The options are :"lmhosts", "host", "wins" and "bcast". They
- cause names to be resolved as follows : </para>
- <itemizedlist>
- <listitem><para><constant>lmhosts</constant> : Lookup an IP
- address in the Samba lmhosts file. If the line in lmhosts has
- no name type attached to the NetBIOS name (see the <ulink
- url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
- any name type matches for lookup.</para></listitem>
-
- <listitem><para><constant>host</constant> : Do a standard host
- name to IP address resolution, using the system <filename>/etc/hosts
- </filename>, NIS, or DNS lookups. This method of name resolution
- is operating system depended for instance on IRIX or Solaris this
- may be controlled by the <filename>/etc/nsswitch.conf</filename>
- file). Note that this method is only used if the NetBIOS name
- type being queried is the 0x20 (server) name type, otherwise
- it is ignored.</para></listitem>
-
- <listitem><para><constant>wins</constant> : Query a name with
- the IP address listed in the <parameter>wins server</parameter>
- parameter. If no WINS server has been specified this method
- will be ignored.</para></listitem>
-
- <listitem><para><constant>bcast</constant> : Do a broadcast on
- each of the known local interfaces listed in the
- <parameter>interfaces</parameter> parameter. This is the least
- reliable of the name resolution methods as it depends on the
- target host being on a locally connected subnet.</para></listitem>
- </itemizedlist>
-
- <para>The default order is <command>lmhosts, host, wins, bcast</command>
- and without this parameter or any entry in the
- <filename>smb.conf</filename> file the name resolution methods will
- be attempted in this order. </para></listitem>
+
+
+ <varlistentry>
+ <term>-S</term>
+ <listitem><para>This option causes <command>smbpasswd</command>
+ to query a domain controller of the domain specified
+ by the <ulink url="smb.conf.5.html#WORKGROUP">workgroup</ulink>
+ parameter in <filename>smb.conf</filename> and store the
+ domain SID in the <filename>secrets.tdb</filename> file
+ as its own machine SID. This is only useful when configuring
+ a Samba PDC and Samba BDC, or when migrating from a Windows PDC
+ to a Samba PDC. </para>
+
+ <para>The <parameter>-r</parameter> options can be used
+ as well to indicate a specific domain controller which should
+ be contacted. In this case, the domain SID obtained is the
+ one for the domain to which the remote machine belongs.
+ </para>
+ </listitem>
</varlistentry>
+
-
- <varlistentry>
- <term>-m</term>
- <listitem><para>This option tells smbpasswd that the account
- being changed is a MACHINE account. Currently this is used
- when Samba is being used as an NT Primary Domain Controller.</para>
- <para>This option is only available when running smbpasswd as root.
- </para></listitem>
+ <varlistentry>
+ <term>-t</term>
+ <listitem><para>This option is used to force smbpasswd to
+ change the current password assigned to the machine trust account
+ when operating in domain security mode. This is really meant to
+ be used on systems that only run <ulink url="winbindd.8.html"<command>winbindd</command></ulink>.
+ Under server installations, <ulink url="smbd.8.html"><command>smbd</command></ulink>
+ handle the password updates automatically.</para>
+ </listitem>
</varlistentry>
-
+
+
<varlistentry>
- <term>-U username</term>
+ <term>-U username[%pass]</term>
<listitem><para>This option may only be used in conjunction
with the <parameter>-r</parameter> option. When changing
a password on a remote machine it allows the user to specify
the user name on that machine whose password will be changed. It
is present to allow users who have different user names on
- different systems to change these passwords. </para></listitem>
+ different systems to change these passwords. The optional
+ %pass may be used to specify to old password.</para>
+
+ <para>In particular, this parameter specifies the username
+ used to create the machine account when invoked with -j</para>
+ </listitem>
</varlistentry>
+<varlistentry>
+<term><command>NOTE:</command></term>
+<listitem><para>
+<command>The following options are available only when the smbpasswd command is
+run as root or in local mode.</command>
+</para></listitem>
+</varlistentry>
+
<varlistentry>
- <term>-h</term>
- <listitem><para>This option prints the help string for <command>
- smbpasswd</command>, selecting the correct one for running as root
- or as an ordinary user. </para></listitem>
+ <term>-a</term>
+ <listitem><para>This option specifies that the username
+ following should be added to the local smbpasswd file, with the
+ new password typed. This
+ option is ignored if the username specified already exists in
+ the smbpasswd file and it is treated like a regular change
+ password command. Note that the user to be added must already exist
+ in the system password file (usually <filename>/etc/passwd</filename>)
+ else the request to add the user will fail. </para></listitem>
</varlistentry>
+ <varlistentry>
+ <term>-d</term>
+ <listitem><para>This option specifies that the username following
+ should be <constant>disabled</constant> in the local smbpasswd
+ file. This is done by writing a <constant>'D'</constant> flag
+ into the account control space in the smbpasswd file. Once this
+ is done all attempts to authenticate via SMB using this username
+ will fail. </para>
+
+ <para>If the smbpasswd file is in the 'old' format (pre-Samba 2.0
+ format) there is no space in the user's password entry to write
+ this information and so the user is disabled by writing 'X' characters
+ into the password space in the smbpasswd file. See <command>smbpasswd(5)
+ </command> for details on the 'old' and new password file formats.
+ </para></listitem>
+ </varlistentry>
+
<varlistentry>
- <term>-s</term>
- <listitem><para>This option causes smbpasswd to be silent (i.e.
- not issue prompts) and to read its old and new passwords from
- standard input, rather than from <filename>/dev/tty</filename>
- (like the <command>passwd(1)</command> program does). This option
- is to aid people writing scripts to drive smbpasswd</para>
+ <term>-e</term>
+ <listitem><para>This option specifies that the username following
+ should be <constant>enabled</constant> in the local smbpasswd file,
+ if the account was previously disabled. If the account was not
+ disabled this option has no effect. Once the account is enabled then
+ the user will be able to authenticate via SMB once again. </para>
+
+ <para>If the smbpasswd file is in the 'old' format, then <command>
+ smbpasswd</command> will prompt for a new password for this user,
+ otherwise the account will be enabled by removing the <constant>'D'
+ </constant> flag from account control space in the <filename>
+ smbpasswd</filename> file. See <command>smbpasswd (5)</command> for
+ details on the 'old' and new password file formats. </para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-m</term>
+ <listitem><para>This option tells smbpasswd that the account
+ being changed is a MACHINE account. Currently this is used
+ when Samba is being used as an NT Primary Domain Controller.</para>
</listitem>
</varlistentry>
+
+ <varlistentry>
+ <term>-n</term>
+ <listitem><para>This option specifies that the username following
+ should have their password set to null (i.e. a blank password) in
+ the local smbpasswd file. This is done by writing the string "NO
+ PASSWORD" as the first part of the first password stored in the
+ smbpasswd file. </para>
+ <para>Note that to allow users to logon to a Samba server once
+ the password has been set to "NO PASSWORD" in the smbpasswd
+ file the administrator must set the following parameter in the [global]
+ section of the <filename>smb.conf</filename> file : </para>
+
+ <para><command>null passwords = yes</command></para></listitem>
+ </varlistentry>
+
+
<varlistentry>
<term>-w password</term>
- <listitem><para>This parameter is only available if Samba
+ <listitem><para>This parameter is only available is Samba
has been configured to use the experimental
<command>--with-ldapsam</command> option. The <parameter>-w</parameter>
switch is used to specify the password to be used with the
@@ -320,6 +311,103 @@
<varlistentry>
+ <term>-x</term>
+ <listitem><para>This option specifies that the username
+ following should be deleted from the local smbpasswd file.
+ </para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-j DOMAIN</term>
+ <listitem><para>This option is used to add a Samba server
+ into a Windows NT Domain, as a Domain member capable of authenticating
+ user accounts to any Domain Controller in the same way as a Windows
+ NT Server. See the <command>security = domain</command> option in
+ the <filename>smb.conf(5)</filename> man page. </para>
+
+ <para>This command can work both with and without the -U parameter. </para>
+
+ <para>When invoked with -U, that username (and optional password) are
+ used to contact the PDC (which must be specified with -r) to both
+ create a machine account, and to set a password on it.</para>
+
+ <para>Alternately, if -U is omitted, Samba will contact its PDC
+ and attempt to change the password on a pre-existing account. </para>
+
+ <para>In order to be used in this way, the Administrator for
+ the Windows NT Domain must have used the program "Server Manager
+ for Domains" to add the primary NetBIOS name of the Samba server
+ as a member of the Domain. </para>
+
+ <para>After this has been done, to join the Domain invoke <command>
+ smbpasswd</command> with this parameter. smbpasswd will then
+ look up the Primary Domain Controller for the Domain (found in
+ the <filename>smb.conf</filename> file in the parameter
+ <parameter>password server</parameter> and change the machine account
+ password used to create the secure Domain communication. </para>
+
+ <para>Either way, this password is then stored by smbpasswd in a TDB,
+ writeable only by root, called <filename>secrets.tdb</filename> </para>
+
+ <para>Once this operation has been performed the <filename>
+ smb.conf</filename> file may be updated to set the <command>
+ security = domain</command> option and all future logins
+ to the Samba server will be authenticated to the Windows NT
+ PDC. </para>
+
+ <para>Note that even though the authentication is being
+ done to the PDC all users accessing the Samba server must still
+ have a valid UNIX account on that machine.
+ The <command>winbindd(8)</command> daemon can be used
+ to create UNIX accounts for NT users.</para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
+ <term>-R name resolve order</term>
+ <listitem><para>This option allows the user of smbpasswd to determine
+ what name resolution services to use when looking up the NetBIOS
+ name of the host being connected to. </para>
+
+ <para>The options are :"lmhosts", "host", "wins" and "bcast". They cause
+ names to be resolved as follows : </para>
+ <itemizedlist>
+ <listitem><para><constant>lmhosts</constant> : Lookup an IP
+ address in the Samba lmhosts file. If the line in lmhosts has
+ no name type attached to the NetBIOS name (see the <ulink
+ url="lmhosts.5.html">lmhosts(5)</ulink> for details) then
+ any name type matches for lookup.</para></listitem>
+
+ <listitem><para><constant>host</constant> : Do a standard host
+ name to IP address resolution, using the system <filename>/etc/hosts
+ </filename>, NIS, or DNS lookups. This method of name resolution
+ is operating system dependent. For instance, on IRIX or Solaris this
+ may be controlled by the <filename>/etc/nsswitch.conf</filename>
+ file). Note that this method is only used if the NetBIOS name
+ type being queried is the 0x20 (server) name type, otherwise
+ it is ignored.</para></listitem>
+
+ <listitem><para><constant>wins</constant> : Query a name with
+ the IP address listed in the <parameter>wins server</parameter>
+ parameter. If no WINS server has been specified this method
+ will be ignored.</para></listitem>
+
+ <listitem><para><constant>bcast</constant> : Do a broadcast on
+ each of the known local interfaces listed in the
+ <parameter>interfaces</parameter> parameter. This is the least
+ reliable of the name resolution methods as it depends on the
+ target host being on a locally connected subnet.</para></listitem>
+ </itemizedlist>
+
+ <para>The default order is <command>lmhosts, host, wins, bcast</command>
+ and without this parameter or any entry in the
+ <filename>smb.conf</filename> file the name resolution methods will
+ be attempted in this order. </para></listitem>
+ </varlistentry>
+
+
+ <varlistentry>
<term>username</term>
<listitem><para>This specifies the username for all of the
<emphasis>root only</emphasis> options to operate on. Only root
@@ -327,6 +415,15 @@
to modify attributes directly in the local smbpasswd file.
</para></listitem>
</varlistentry>
+
+
+ <varlistentry>
+ <term>password</term>
+ <listitem><para>This specifies the new password. If this parameter
+ is specified you will not be prompted for the new password.
+ </para></listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
@@ -353,7 +450,7 @@
<refsect1>
<title>VERSION</title>
- <para>This man page is correct for version 3.0 of
+ <para>This man page is correct for version 2.2 of
the Samba suite.</para>
</refsect1>
@@ -382,7 +479,3 @@
</refsect1>
</refentry>
-
-
-
-