Update manpage to match to Simo's latest pdbedit changes
[kai/samba.git] / docs / docbook / manpages / pdbedit.8.sgml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="pdbedit">
3
4 <refmeta>
5         <refentrytitle>pdbedit</refentrytitle>
6         <manvolnum>8</manvolnum>
7 </refmeta>
8
9
10 <refnamediv>
11         <refname>pdbedit</refname>
12         <refpurpose>manage the SAM database</refpurpose>
13 </refnamediv>
14
15 <refsynopsisdiv>
16         <cmdsynopsis>
17                 <command>pdbedit</command>
18                 <arg choice="opt">-l</arg>      
19                 <arg choice="opt">-v</arg>      
20                 <arg choice="opt">-w</arg>      
21                 <arg choice="opt">-u username</arg>     
22                 <arg choice="opt">-f fullname</arg>     
23                 <arg choice="opt">-h homedir</arg>      
24                 <arg choice="opt">-d drive</arg>        
25                 <arg choice="opt">-s script</arg>
26                 <arg choice="opt">-p profile</arg>      
27                 <arg choice="opt">-a</arg>      
28                 <arg choice="opt">-m</arg>      
29                 <arg choice="opt">-x</arg>      
30                 <arg choice="opt">-i passdb-backend</arg>       
31                 <arg choice="opt">-e passdb-backend</arg>   
32                 <arg choice="opt">-b passdb-backend</arg>
33                 <arg choice="opt">-D debuglevel</arg>
34         </cmdsynopsis>
35 </refsynopsisdiv>
36
37 <refsect1>
38         <title>DESCRIPTION</title>
39
40         <para>This tool is part of the <ulink url="samba.7.html">
41         Samba</ulink> suite.</para>
42
43         <para>The pdbedit program is used to manage the users accounts
44         stored in the sam database and can be run only by root.</para>
45
46         <para>The pdbedit tool use the passdb modular interface and is
47         independent from the kind of users database used (currently there
48         are smbpasswd, ldap, nis+ and tdb based and more can be addedd
49         without changing the tool).</para>
50
51         <para>There are five main ways to use pdbedit: adding a user account,
52         removing a user account, modifing a user account, listing user
53         accounts, importing users accounts.</para>
54 </refsect1>
55
56 <refsect1>
57         <title>OPTIONS</title>
58         <variablelist>
59                 <varlistentry>
60                 <term>-l</term>
61                 <listitem><para>This option list all the user accounts
62                 present in the users database.
63                 This option prints a list of user/uid pairs separated by
64                 the ':' character.</para>
65
66                 <para>Example: <command>pdbedit -l</command></para>
67                 <para><programlisting>
68                 sorce:500:Simo Sorce
69                 samba:45:Test User
70                 </programlisting></para>
71                 </listitem>
72                 </varlistentry>
73                 
74                 
75                 
76                 <varlistentry>
77                 <term>-v</term>
78                 <listitem><para>This option sets the verbose listing format.
79                 It will make pdbedit list the users in the database printing
80                 out the account fields in a descriptive format.</para>
81
82                 <para>Example: <command>pdbedit -l -v</command></para>
83                 <para><programlisting>
84                 ---------------
85                 username:       sorce
86                 user ID/Group:  500/500
87                 user RID/GRID:  2000/2001
88                 Full Name:      Simo Sorce
89                 Home Directory: \\BERSERKER\sorce
90                 HomeDir Drive:  H:
91                 Logon Script:   \\BERSERKER\netlogon\sorce.bat
92                 Profile Path:   \\BERSERKER\profile
93                 ---------------
94                 username:       samba
95                 user ID/Group:  45/45
96                 user RID/GRID:  1090/1091
97                 Full Name:      Test User
98                 Home Directory: \\BERSERKER\samba
99                 HomeDir Drive:  
100                 Logon Script:   
101                 Profile Path:   \\BERSERKER\profile
102                 </programlisting></para>
103                 </listitem>
104                 </varlistentry>
105                 
106                 
107                 
108                 <varlistentry>
109                 <term>-w</term>
110                 <listitem><para>This option sets the "smbpasswd" listing format.
111                 It will make pdbedit list the users in the database printing
112                 out the account fields in a format compatible with the
113                 <filename>smbpasswd</filename> file format. (see the <ulink
114                 url="smbpasswd.5.html"><filename>smbpasswd(5)</filename></ulink> for details)</para>
115
116                 <para>Example: <command>pdbedit -l -w</command></para>
117                 <para><programlisting>
118                 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
119                 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
120                 </programlisting></para>
121                 </listitem>
122                 </varlistentry>
123                 
124                 
125                 <varlistentry>
126                 <term>-u username</term>
127                 <listitem><para>This option specifies that the username to be
128                 used for the operation requested (listing, adding, removing)
129                 It is <emphasis>required</emphasis> in add, remove and modify
130                 operations and <emphasis>optional</emphasis> in list
131                 operations.</para>
132                 </listitem>
133                 </varlistentry>
134                 
135
136
137                 <varlistentry>
138                 <term>-f fullname</term>
139                 <listitem><para>This option can be used while adding or
140                 modifing a user account. It will specify the user's full
141                 name. </para>
142
143                 <para>Example: <command>-f "Simo Sorce"</command></para>
144                 </listitem>
145                 </varlistentry>
146                 
147                 
148                 
149                 <varlistentry>
150                 <term>-h homedir</term>
151                 <listitem><para>This option can be used while adding or
152                 modifing a user account. It will specify the user's home
153                 directory network path.</para>
154
155                 <para>Example: <command>-h "\\\\BERSERKER\\sorce"</command>
156                 </para>
157                 </listitem>
158                 </varlistentry>
159                 
160                 
161                 
162                 <varlistentry>
163                 <term>-d drive</term>
164                 <listitem><para>This option can be used while adding or
165                 modifing a user account. It will specify the windows drive
166                 letter to be used to map the home directory.</para>
167
168                 <para>Example: <command>-d "H:"</command>
169                 </para>
170                 </listitem>
171                 </varlistentry>
172                 
173                 
174                 <varlistentry>
175                 <term>-s script</term>
176                 <listitem><para>This option can be used while adding or
177                 modifing a user account. It will specify the user's logon
178                 script path.</para>
179
180                 <para>Example: <command>-s "\\\\BERSERKER\\netlogon\\sorce.bat"</command>
181                 </para>
182                 </listitem>
183                 </varlistentry>
184                 
185                 
186                 <varlistentry>
187                 <term>-p profile</term>
188                 <listitem><para>This option can be used while adding or
189                 modifing a user account. It will specify the user's profile
190                 directory.</para>
191
192                 <para>Example: <command>-p "\\\\BERSERKER\\netlogon"</command>
193                 </para>
194                 </listitem>
195                 </varlistentry>
196                 
197                 
198                 <varlistentry>
199                 <term>-a</term>
200                 <listitem><para>This option is used to add a user into the
201                 database. This command need the user name be specified with
202                 the -u switch. When adding a new user pdbedit will also
203                 ask for the password to be used</para>
204
205                 <para>Example: <command>pdbedit -a -u sorce</command>
206                 <programlisting>new password:
207                 retype new password</programlisting>
208                 </para>
209                 </listitem>
210                 </varlistentry>
211                 
212                 
213                 
214                 <varlistentry>
215                 <term>-m</term>
216                 <listitem><para>This option may only be used in conjunction 
217                 with the <parameter>-a</parameter> option. It will make
218                 pdbedit to add a machine trust account instead of a user
219                 account (-u username will provide the machine name).</para>
220
221                 <para>Example: <command>pdbedit -a -m -u w2k-wks</command>
222                 </para>
223                 </listitem>
224                 </varlistentry>
225                 
226                 
227                 <varlistentry>
228                 <term>-x</term>
229                 <listitem><para>This option causes pdbedit to delete an account
230                 from the database. It need the username be specified with the
231                 -u switch.</para>
232
233                 <para>Example: <command>pdbedit -x -u bob</command></para>
234                 </listitem>
235                 </varlistentry>
236                 
237
238                 <varlistentry>
239                 <term>-i passdb-backend</term>
240                 <listitem><para>Use a different passdb backend to retrieve users than the one specified in smb.conf. Can be used to import data into your 
241                 local user database.</para>
242
243                 <para>This option will ease migration from one passdb backend to another.
244                 </para>
245
246                 <para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old</command>
247                 </para>
248                 </listitem>
249                 </varlistentry>
250
251                 <varlistentry>
252                 <term>-e passdb-backend</term>
253                 <listitem><para>Export all currently available users to the specified password database backend.</para>
254
255                 <para>This option will ease migration from one passdb backend to another and will ease backupping</para>
256                 
257                 <para>Example: <command>pdbedit -e smbpasswd:/root/samba-users.backup</command></para>
258                 </listitem>
259                 </varlistentry>
260
261                 <varlistentry>
262                 <term>-b passdb-backend</term>
263                 <listitem><para>Use a different default passdb backend. </para>
264
265                 <para>Example: <command>pdbedit -b xml:/root/pdb-backup.xml -l</command></para>
266                 </listitem>
267                 </varlistentry>
268         </variablelist>
269 </refsect1>
270
271
272 <refsect1>
273         <title>NOTES</title>
274         
275         <para>This command may be used only by root.</para>
276 </refsect1>
277
278
279 <refsect1>
280         <title>VERSION</title>
281
282         <para>This man page is correct for version 2.2 of 
283         the Samba suite.</para>
284 </refsect1>
285
286 <refsect1>
287         <title>SEE ALSO</title>
288         <para><ulink url="smbpasswd.8.html">smbpasswd(8)</ulink>, 
289         <ulink url="samba.7.html">samba(7)</ulink>
290         </para>
291 </refsect1>
292
293 <refsect1>
294         <title>AUTHOR</title>
295         
296         <para>The original Samba software and related utilities 
297         were created by Andrew Tridgell. Samba is now developed
298         by the Samba Team as an Open Source project similar 
299         to the way the Linux kernel is developed.</para>
300         
301         <para>The original Samba man pages were written by Karl Auer. 
302         The man page sources were converted to YODL format (another 
303         excellent piece of Open Source software, available at
304         <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
305         ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0 
306         release by Jeremy Allison.  The conversion to DocBook for 
307         Samba 2.2 was done by Gerald Carter</para>
308 </refsect1>
309
310 </refentry>