This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / docs / docbook / manpages / pdbedit.8.xml
1 <?xml version="1.0" encoding="iso8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3                   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4
5 <!ENTITY % globalentities SYSTEM './../global.ent'> %globalentities;
6 ]>
7 <refentry id="pdbedit.8">
8
9 <refmeta>
10         <refentrytitle>pdbedit</refentrytitle>
11         <manvolnum>8</manvolnum>
12 </refmeta>
13
14
15 <refnamediv>
16         <refname>pdbedit</refname>
17         <refpurpose>manage the SAM database</refpurpose>
18 </refnamediv>
19
20 <refsynopsisdiv>
21         <cmdsynopsis>
22                 <command>pdbedit</command>
23                 <arg choice="opt">-L</arg>      
24                 <arg choice="opt">-v</arg>      
25                 <arg choice="opt">-w</arg>      
26                 <arg choice="opt">-u username</arg>     
27                 <arg choice="opt">-f fullname</arg>     
28                 <arg choice="opt">-h homedir</arg>      
29                 <arg choice="opt">-D drive</arg>        
30                 <arg choice="opt">-S script</arg>
31                 <arg choice="opt">-p profile</arg>      
32                 <arg choice="opt">-a</arg>      
33                 <arg choice="opt">-m</arg>      
34                 <arg choice="opt">-x</arg>      
35                 <arg choice="opt">-i passdb-backend</arg>       
36                 <arg choice="opt">-e passdb-backend</arg>   
37                 <arg choice="opt">-b passdb-backend</arg>
38                 <arg choice="opt">-g</arg>
39                 <arg choice="opt">-d debuglevel</arg>
40                 <arg choice="opt">-s configfile</arg>
41                 <arg choice="opt">-P account-policy</arg>
42                 <arg choice="opt">-C value</arg>
43         </cmdsynopsis>
44 </refsynopsisdiv>
45
46 <refsect1>
47         <title>DESCRIPTION</title>
48
49         <para>This tool is part of the <citerefentry><refentrytitle>Samba</refentrytitle>
50         <manvolnum>7</manvolnum></citerefentry> suite.</para>
51
52         <para>The pdbedit program is used to manage the users accounts
53         stored in the sam database and can only be run by root.</para>
54
55         <para>The pdbedit tool uses the passdb modular interface and is
56         independent from the kind of users database used (currently there
57         are smbpasswd, ldap, nis+ and tdb based and more can be added
58         without changing the tool).</para>
59
60         <para>There are five main ways to use pdbedit: adding a user account,
61         removing a user account, modifing a user account, listing user
62         accounts, importing users accounts.</para>
63 </refsect1>
64
65 <refsect1>
66         <title>OPTIONS</title>
67         <variablelist>
68                 <varlistentry>
69                 <term>-L</term>
70                 <listitem><para>This option lists all the user accounts
71                 present in the users database.
72                 This option prints a list of user/uid pairs separated by
73                 the ':' character.</para>
74                 <para>Example: <command>pdbedit -L</command></para>
75                 <para><screen>
76 sorce:500:Simo Sorce
77 samba:45:Test User
78 </screen></para>
79                 </listitem>
80                 </varlistentry>
81                 
82                 
83                 
84                 <varlistentry>
85                 <term>-v</term>
86                 <listitem><para>This option enables the verbose listing format.
87                 It causes pdbedit to list the users in the database, printing
88                 out the account fields in a descriptive format.</para>
89
90                 <para>Example: <command>pdbedit -l -v</command></para>
91                 <para><screen>
92 ---------------
93 username:       sorce
94 user ID/Group:  500/500
95 user RID/GRID:  2000/2001
96 Full Name:      Simo Sorce
97 Home Directory: \\BERSERKER\sorce
98 HomeDir Drive:  H:
99 Logon Script:   \\BERSERKER\netlogon\sorce.bat
100 Profile Path:   \\BERSERKER\profile
101 ---------------
102 username:       samba
103 user ID/Group:  45/45
104 user RID/GRID:  1090/1091
105 Full Name:      Test User
106 Home Directory: \\BERSERKER\samba
107 HomeDir Drive:  
108 Logon Script:   
109 Profile Path:   \\BERSERKER\profile
110 </screen></para>
111                 </listitem>
112                 </varlistentry>
113                 
114                 
115                 
116                 <varlistentry>
117                 <term>-w</term>
118                 <listitem><para>This option sets the "smbpasswd" listing format.
119                 It will make pdbedit list the users in the database, printing
120                 out the account fields in a format compatible with the
121                 <filename>smbpasswd</filename> file format. (see the
122                 <citerefentry><refentrytitle>smbpasswd</refentrytitle>
123                 <manvolnum>5</manvolnum></citerefentry> for details)</para>
124
125                 <para>Example: <command>pdbedit -L -w</command></para>
126                 <screen>
127 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
128 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
129 </screen>
130                 </listitem>
131                 </varlistentry>
132                 
133                 
134                 <varlistentry>
135                 <term>-u username</term>
136                 <listitem><para>This option specifies the username to be
137                 used for the operation requested (listing, adding, removing).
138                 It is <emphasis>required</emphasis> in add, remove and modify
139                 operations and <emphasis>optional</emphasis> in list
140                 operations.</para>
141                 </listitem>
142                 </varlistentry>
143
144                 <varlistentry>
145                 <term>-f fullname</term>
146                 <listitem><para>This option can be used while adding or
147                 modifing a user account. It will specify the user's full
148                 name. </para>
149
150                 <para>Example: <command>-f "Simo Sorce"</command></para>
151                 </listitem>
152                 </varlistentry>
153                 
154                 <varlistentry>
155                 <term>-h homedir</term>
156                 <listitem><para>This option can be used while adding or
157                 modifing a user account. It will specify the user's home
158                 directory network path.</para>
159
160                 <para>Example: <command>-h "\\\\BERSERKER\\sorce"</command>
161                 </para>
162                 </listitem>
163                 </varlistentry>
164                 
165                 <varlistentry>
166                 <term>-D drive</term>
167                 <listitem><para>This option can be used while adding or
168                 modifing a user account. It will specify the windows drive
169                 letter to be used to map the home directory.</para>
170
171                 <para>Example: <command>-d "H:"</command>
172                 </para>
173                 </listitem>
174                 </varlistentry>
175                 
176                 
177                 <varlistentry>
178                 <term>-S script</term>
179                 <listitem><para>This option can be used while adding or
180                 modifing a user account. It will specify the user's logon
181                 script path.</para>
182
183                 <para>Example: <command>-s "\\\\BERSERKER\\netlogon\\sorce.bat"</command>
184                 </para>
185                 </listitem>
186                 </varlistentry>
187                 
188                 
189                 <varlistentry>
190                 <term>-p profile</term>
191                 <listitem><para>This option can be used while adding or
192                 modifing a user account. It will specify the user's profile
193                 directory.</para>
194
195                 <para>Example: <command>-p "\\\\BERSERKER\\netlogon"</command>
196                 </para>
197                 </listitem>
198                 </varlistentry>
199
200                 <varlistentry>
201                 <term>-G SID|rid</term>
202                 <listitem><para>
203                 This option can be used while adding or modifying a user account. It 
204                 will specify the users' new primary group SID (Security Identifier) or 
205                 rid. </para>
206
207                 <para>Example: <command>-G S-1-5-21-2447931902-1787058256-3961074038-1201</command></para>
208                 </listitem>
209                 </varlistentry>
210
211                 <varlistentry>
212                 <term>-U SID|rid</term>
213                 <listitem><para>
214                 This option can be used while adding or modifying a user account. It 
215                 will specify the users' new SID (Security Identifier) or 
216                 rid. </para>
217
218                 <para>Example: <command>-U S-1-5-21-2447931902-1787058256-3961074038-5004</command></para>
219                 </listitem>
220                 </varlistentry>
221
222                 <varlistentry>
223                 <term>-c account-control</term>
224                 <listitem><para>This option can be used while adding or modifying a user
225                 account. It will specify the users' account control property. Possible
226                 flags that can be set are: N, D, H, L, X.                               
227                 </para>
228
229                 <para>Example: <command>-c "[X          ]"</command></para>
230                 </listitem>
231                 </varlistentry>
232
233                 <varlistentry>
234                 <term>-a</term>
235                 <listitem><para>This option is used to add a user into the
236                 database. This command needs a user name specified with
237                 the -u switch. When adding a new user, pdbedit will also
238                 ask for the password to be used.</para>
239
240                 <para>Example: <command>pdbedit -a -u sorce</command>
241 <programlisting>new password:
242 retype new password
243 </programlisting>
244 </para>
245                 </listitem>
246                 </varlistentry>
247                 
248                 <varlistentry>
249                 <term>-r</term>
250                 <listitem><para>This option is used to modify an existing user 
251                 in the database. This command needs a user name specified with the -u 
252                 switch. Other options can be specified to modify the properties of 
253                 the specified user. This flag is kept for backwards compatibility, but 
254                 it is no longer necessary to specify it.
255                 </para></listitem>
256                 </varlistentry>
257                         
258                 <varlistentry>
259                 <term>-m</term>
260                 <listitem><para>This option may only be used in conjunction 
261                 with the <parameter>-a</parameter> option. It will make
262                 pdbedit to add a machine trust account instead of a user
263                 account (-u username will provide the machine name).</para>
264
265                 <para>Example: <command>pdbedit -a -m -u w2k-wks</command>
266                 </para>
267                 </listitem>
268                 </varlistentry>
269                 
270                 
271                 <varlistentry>
272                 <term>-x</term>
273                 <listitem><para>This option causes pdbedit to delete an account
274                 from the database. It needs a username specified with the
275                 -u switch.</para>
276
277                 <para>Example: <command>pdbedit -x -u bob</command></para>
278                 </listitem>
279                 </varlistentry>
280                 
281
282                 <varlistentry>
283                 <term>-i passdb-backend</term>
284                 <listitem><para>Use a different passdb backend to retrieve users
285                 than the one specified in smb.conf. Can be used to import data into
286                 your local user database.</para>
287
288                 <para>This option will ease migration from one passdb backend to
289                 another.</para>
290
291                 <para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old
292                 </command></para>
293                 </listitem>
294                 </varlistentry>
295
296                 <varlistentry>
297                 <term>-e passdb-backend</term>
298                 <listitem><para>Exports all currently available users to the
299                 specified password database backend.</para>
300
301                 <para>This option will ease migration from one passdb backend to
302                 another and will ease backing up.</para>
303                 
304                 <para>Example: <command>pdbedit -e smbpasswd:/root/samba-users.backup</command></para>
305                 </listitem>
306                 </varlistentry>
307
308                 <varlistentry>
309                 <term>-g</term>
310                 <listitem><para>If you specify <parameter>-g</parameter>,
311                 then <parameter>-i in-backend -e out-backend</parameter>
312                 applies to the group mapping instead of the user database.</para>
313
314                 <para>This option will ease migration from one passdb backend to
315                 another and will ease backing up.</para>
316                 
317                 </listitem>
318                 </varlistentry>
319
320                 <varlistentry>
321                 <term>-b passdb-backend</term>
322                 <listitem><para>Use a different default passdb backend. </para>
323
324                 <para>Example: <command>pdbedit -b xml:/root/pdb-backup.xml -l</command></para>
325                 </listitem>
326                 </varlistentry>
327
328                 <varlistentry>
329                 <term>-P account-policy</term>
330                 <listitem><para>Display an account policy</para>
331                 <para>Valid policies are: minimum password age, reset count minutes, disconnect time,
332                 user must logon to change password, password history, lockout duration, min password length,
333                 maximum password age and bad lockout attempt.</para>
334
335                 <para>Example: <command>pdbedit -P "bad lockout attempt"</command></para>
336 <para><programlisting>
337 account policy value for bad lockout attempt is 0
338 </programlisting></para>
339
340                 </listitem>
341                 </varlistentry>
342
343
344                 <varlistentry>
345                 <term>-C account-policy-value</term>
346                 <listitem><para>Sets an account policy to a specified value. 
347                 This option may only be used in conjunction
348                 with the <parameter>-P</parameter> option.
349                 </para>
350
351                 <para>Example: <command>pdbedit -P "bad lockout attempt" -C 3</command></para>
352 <para><programlisting>
353 account policy value for bad lockout attempt was 0
354 account policy value for bad lockout attempt is now 3
355 </programlisting></para>
356                 </listitem>
357                 </varlistentry>
358                 
359                 &stdarg.help;
360                 &popt.common.samba;
361
362         </variablelist>
363 </refsect1>
364
365
366 <refsect1>
367         <title>NOTES</title>
368         
369         <para>This command may be used only by root.</para>
370 </refsect1>
371
372
373 <refsect1>
374         <title>VERSION</title>
375
376         <para>This man page is correct for version 3.0 of 
377         the Samba suite.</para>
378 </refsect1>
379
380 <refsect1>
381         <title>SEE ALSO</title>
382         <para><citerefentry><refentrytitle>smbpasswd</refentrytitle>
383         <manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>samba</refentrytitle>
384         <manvolnum>7</manvolnum></citerefentry></para>
385 </refsect1>
386
387 <refsect1>
388         <title>AUTHOR</title>
389         
390         <para>The original Samba software and related utilities 
391         were created by Andrew Tridgell. Samba is now developed
392         by the Samba Team as an Open Source project similar 
393         to the way the Linux kernel is developed.</para>
394
395 </refsect1>
396
397 </refentry>