source: trunk/server/docs/manpages/smbpasswd.8

Last change on this file was 862, checked in by Silvan Scherrer, 12 years ago

Samba Server: update trunk to 3.6.23

File size: 13.4 KB
Line 
1'\" t
2.\" Title: smbpasswd
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5.\" Date: 09/18/2013
6.\" Manual: System Administration tools
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "SMBPASSWD" "8" "09/18/2013" "Samba 3\&.6" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * Define some portability stuff
13.\" -----------------------------------------------------------------
14.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15.\" http://bugs.debian.org/507673
16.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18.ie \n(.g .ds Aq \(aq
19.el .ds Aq '
20.\" -----------------------------------------------------------------
21.\" * set default formatting
22.\" -----------------------------------------------------------------
23.\" disable hyphenation
24.nh
25.\" disable justification (adjust text to left margin only)
26.ad l
27.\" -----------------------------------------------------------------
28.\" * MAIN CONTENT STARTS HERE *
29.\" -----------------------------------------------------------------
30.SH "NAME"
31smbpasswd \- change a user\*(Aqs SMB password
32.SH "SYNOPSIS"
33.HP \w'\ 'u
34smbpasswd [\-a] [\-c\ <config\ file>] [\-x] [\-d] [\-e] [\-D\ debuglevel] [\-n] [\-r\ <remote\ machine>] [\-R\ <name\ resolve\ order>] [\-m] [\-U\ username[%password]] [\-h] [\-s] [\-w\ pass] [\-W] [\-i] [\-L] [username]
35.SH "DESCRIPTION"
36.PP
37This tool is part of the
38\fBsamba\fR(7)
39suite\&.
40.PP
41The smbpasswd program has several different functions, depending on whether it is run by the
42\fIroot\fR
43user or not\&. When run as a normal user it allows the user to change the password used for their SMB sessions on any machines that store SMB passwords\&.
44.PP
45By default (when run with no arguments) it will attempt to change the current user\*(Aqs SMB password on the local machine\&. This is similar to the way the
46passwd(1)
47program works\&.
48smbpasswd
49differs from how the passwd program works however in that it is not
50\fIsetuid root\fR
51but works in a client\-server mode and communicates with a locally running
52\fBsmbd\fR(8)\&. As a consequence in order for this to succeed the smbd daemon must be running on the local machine\&. On a UNIX machine the encrypted SMB passwords are usually stored in the
53\fBsmbpasswd\fR(5)
54file\&.
55.PP
56When 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 whilst being typed\&. If you have a blank SMB password (specified by the string "NO PASSWORD" in the smbpasswd file) then just press the <Enter> key when asked for your old password\&.
57.PP
58smbpasswd can also be used by a normal user to change their SMB password on remote machines, such as Windows NT Primary Domain Controllers\&. See the (\fI\-r\fR) and
59\fI\-U\fR
60options below\&.
61.PP
62When run by root, smbpasswd allows new users to be added and deleted in the smbpasswd file, as well as allows changes to the attributes of the user in this file to be made\&. When run by root,
63smbpasswd
64accesses the local smbpasswd file directly, thus enabling changes to be made even if smbd is not running\&.
65.SH "OPTIONS"
66.PP
67\-a
68.RS 4
69This option specifies that the username following should be added to the local smbpasswd file, with the new password typed (type <Enter> 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
70/etc/passwd), else the request to add the user will fail\&.
71.sp
72This option is only available when running smbpasswd as root\&.
73.RE
74.PP
75\-c
76.RS 4
77This option can be used to specify the path and file name of the
78smb\&.conf
79configuration file when it is important to use other than the default file and / or location\&.
80.RE
81.PP
82\-x
83.RS 4
84This option specifies that the username following should be deleted from the local smbpasswd file\&.
85.sp
86This option is only available when running smbpasswd as root\&.
87.RE
88.PP
89\-d
90.RS 4
91This option specifies that the username following should be
92\fBdisabled\fR
93in the local smbpasswd file\&. This is done by writing a
94\fB\*(AqD\*(Aq\fR
95flag into the account control space in the smbpasswd file\&. Once this is done all attempts to authenticate via SMB using this username will fail\&.
96.sp
97If the smbpasswd file is in the \*(Aqold\*(Aq format (pre\-Samba 2\&.0 format) there is no space in the user\*(Aqs password entry to write this information and the command will FAIL\&. See
98\fBsmbpasswd\fR(5)
99for details on the \*(Aqold\*(Aq and new password file formats\&.
100.sp
101This option is only available when running smbpasswd as root\&.
102.RE
103.PP
104\-e
105.RS 4
106This option specifies that the username following should be
107\fBenabled\fR
108in 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\&.
109.sp
110If the smbpasswd file is in the \*(Aqold\*(Aq format, then
111smbpasswd
112will FAIL to enable the account\&. See
113\fBsmbpasswd\fR(5)
114for details on the \*(Aqold\*(Aq and new password file formats\&.
115.sp
116This option is only available when running smbpasswd as root\&.
117.RE
118.PP
119\-D debuglevel
120.RS 4
121\fIdebuglevel\fR
122is an integer from 0 to 10\&. The default value if this parameter is not specified is zero\&.
123.sp
124The higher this value, the more detail will be logged to the log files about the activities of smbpasswd\&. At level 0, only critical errors and serious warnings will be logged\&.
125.sp
126Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
127.RE
128.PP
129\-n
130.RS 4
131This 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\&.
132.sp
133Note 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
134smb\&.conf
135file :
136.sp
137null passwords = yes
138.sp
139This option is only available when running smbpasswd as root\&.
140.RE
141.PP
142\-r remote machine name
143.RS 4
144This option allows a user to specify what machine they wish to change their password on\&. Without this parameter smbpasswd defaults to the local host\&. The
145\fIremote machine name\fR
146is the NetBIOS name of the SMB/CIFS server to contact to attempt the password change\&. This name is resolved into an IP address using the standard name resolution mechanism in all programs of the Samba suite\&. See the
147\fI\-R name resolve order\fR
148parameter for details on changing this resolving mechanism\&.
149.sp
150The username whose password is changed is that of the current UNIX logged on user\&. See the
151\fI\-U username\fR
152parameter for details on changing the password for a different username\&.
153.sp
154Note that if changing a Windows NT Domain password the remote machine specified must be the Primary Domain Controller for the domain (Backup Domain Controllers only have a read\-only copy of the user account database and will not allow the password change)\&.
155.sp