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