* merge from SAMBA_2_2
[gd/samba-autobuild/.git] / docs / htmldocs / pdbedit.8.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >pdbedit</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.57"></HEAD
8 ><BODY
9 CLASS="REFENTRY"
10 BGCOLOR="#FFFFFF"
11 TEXT="#000000"
12 LINK="#0000FF"
13 VLINK="#840084"
14 ALINK="#0000FF"
15 ><H1
16 ><A
17 NAME="PDBEDIT"
18 >pdbedit</A
19 ></H1
20 ><DIV
21 CLASS="REFNAMEDIV"
22 ><A
23 NAME="AEN5"
24 ></A
25 ><H2
26 >Name</H2
27 >pdbedit&nbsp;--&nbsp;manage the SAM database</DIV
28 ><DIV
29 CLASS="REFSYNOPSISDIV"
30 ><A
31 NAME="AEN8"
32 ></A
33 ><H2
34 >Synopsis</H2
35 ><P
36 ><B
37 CLASS="COMMAND"
38 >pdbedit</B
39 >  [-l] [-v] [-w] [-u username] [-f fullname] [-h homedir] [-d drive] [-s script] [-p profile] [-a] [-m] [-x] [-i passdb-backend] [-e passdb-backend] [-D debuglevel]</P
40 ></DIV
41 ><DIV
42 CLASS="REFSECT1"
43 ><A
44 NAME="AEN26"
45 ></A
46 ><H2
47 >DESCRIPTION</H2
48 ><P
49 >This tool is part of the <A
50 HREF="samba.7.html"
51 TARGET="_top"
52 >       Samba</A
53 > suite.</P
54 ><P
55 >The pdbedit program is used to manage the users accounts
56         stored in the sam database and can be run only by root.</P
57 ><P
58 >The pdbedit tool use the passdb modular interface and is
59         independent from the kind of users database used (currently there
60         are smbpasswd, ldap, nis+ and tdb based and more can be addedd
61         without changing the tool).</P
62 ><P
63 >There are five main ways to use pdbedit: adding a user account,
64         removing a user account, modifing a user account, listing user
65         accounts, importing users accounts.</P
66 ></DIV
67 ><DIV
68 CLASS="REFSECT1"
69 ><A
70 NAME="AEN33"
71 ></A
72 ><H2
73 >OPTIONS</H2
74 ><P
75 ></P
76 ><DIV
77 CLASS="VARIABLELIST"
78 ><DL
79 ><DT
80 >-l</DT
81 ><DD
82 ><P
83 >This option list all the user accounts
84                 present in the users database.
85                 This option prints a list of user/uid pairs separated by
86                 the ':' character.</P
87 ><P
88 >Example: <B
89 CLASS="COMMAND"
90 >pdbedit -l</B
91 ></P
92 ><P
93 ><TABLE
94 BORDER="0"
95 BGCOLOR="#E0E0E0"
96 WIDTH="90%"
97 ><TR
98 ><TD
99 ><PRE
100 CLASS="PROGRAMLISTING"
101 >               sorce:500:Simo Sorce
102                 samba:45:Test User
103                 </PRE
104 ></TD
105 ></TR
106 ></TABLE
107 ></P
108 ></DD
109 ><DT
110 >-v</DT
111 ><DD
112 ><P
113 >This option sets the verbose listing format.
114                 It will make pdbedit list the users in the database printing
115                 out the account fields in a descriptive format.</P
116 ><P
117 >Example: <B
118 CLASS="COMMAND"
119 >pdbedit -l -v</B
120 ></P
121 ><P
122 ><TABLE
123 BORDER="0"
124 BGCOLOR="#E0E0E0"
125 WIDTH="90%"
126 ><TR
127 ><TD
128 ><PRE
129 CLASS="PROGRAMLISTING"
130 >               ---------------
131                 username:       sorce
132                 user ID/Group:  500/500
133                 user RID/GRID:  2000/2001
134                 Full Name:      Simo Sorce
135                 Home Directory: \\BERSERKER\sorce
136                 HomeDir Drive:  H:
137                 Logon Script:   \\BERSERKER\netlogon\sorce.bat
138                 Profile Path:   \\BERSERKER\profile
139                 ---------------
140                 username:       samba
141                 user ID/Group:  45/45
142                 user RID/GRID:  1090/1091
143                 Full Name:      Test User
144                 Home Directory: \\BERSERKER\samba
145                 HomeDir Drive:  
146                 Logon Script:   
147                 Profile Path:   \\BERSERKER\profile
148                 </PRE
149 ></TD
150 ></TR
151 ></TABLE
152 ></P
153 ></DD
154 ><DT
155 >-w</DT
156 ><DD
157 ><P
158 >This option sets the "smbpasswd" listing format.
159                 It will make pdbedit list the users in the database printing
160                 out the account fields in a format compatible with the
161                 <TT
162 CLASS="FILENAME"
163 >smbpasswd</TT
164 > file format. (see the <A
165 HREF="smbpasswd.5.html"
166 TARGET="_top"
167 ><TT
168 CLASS="FILENAME"
169 >smbpasswd(5)</TT
170 ></A
171 > for details)</P
172 ><P
173 >Example: <B
174 CLASS="COMMAND"
175 >pdbedit -l -w</B
176 ></P
177 ><P
178 ><TABLE
179 BORDER="0"
180 BGCOLOR="#E0E0E0"
181 WIDTH="90%"
182 ><TR
183 ><TD
184 ><PRE
185 CLASS="PROGRAMLISTING"
186 >               sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
187                 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
188                 </PRE
189 ></TD
190 ></TR
191 ></TABLE
192 ></P
193 ></DD
194 ><DT
195 >-u username</DT
196 ><DD
197 ><P
198 >This option specifies that the username to be
199                 used for the operation requested (listing, adding, removing)
200                 It is <EM
201 >required</EM
202 > in add, remove and modify
203                 operations and <EM
204 >optional</EM
205 > in list
206                 operations.</P
207 ></DD
208 ><DT
209 >-f fullname</DT
210 ><DD
211 ><P
212 >This option can be used while adding or
213                 modifing a user account. It will specify the user's full
214                 name. </P
215 ><P
216 >Example: <B
217 CLASS="COMMAND"
218 >-f "Simo Sorce"</B
219 ></P
220 ></DD
221 ><DT
222 >-h homedir</DT
223 ><DD
224 ><P
225 >This option can be used while adding or
226                 modifing a user account. It will specify the user's home
227                 directory network path.</P
228 ><P
229 >Example: <B
230 CLASS="COMMAND"
231 >-h "\\\\BERSERKER\\sorce"</B
232 >
233                 </P
234 ></DD
235 ><DT
236 >-d drive</DT
237 ><DD
238 ><P
239 >This option can be used while adding or
240                 modifing a user account. It will specify the windows drive
241                 letter to be used to map the home directory.</P
242 ><P
243 >Example: <B
244 CLASS="COMMAND"
245 >-d "H:"</B
246 >
247                 </P
248 ></DD
249 ><DT
250 >-s script</DT
251 ><DD
252 ><P
253 >This option can be used while adding or
254                 modifing a user account. It will specify the user's logon
255                 script path.</P
256 ><P
257 >Example: <B
258 CLASS="COMMAND"
259 >-s "\\\\BERSERKER\\netlogon\\sorce.bat"</B
260 >
261                 </P
262 ></DD
263 ><DT
264 >-p profile</DT
265 ><DD
266 ><P
267 >This option can be used while adding or
268                 modifing a user account. It will specify the user's profile
269                 directory.</P
270 ><P
271 >Example: <B
272 CLASS="COMMAND"
273 >-p "\\\\BERSERKER\\netlogon"</B
274 >
275                 </P
276 ></DD
277 ><DT
278 >-a</DT
279 ><DD
280 ><P
281 >This option is used to add a user into the
282                 database. This command need the user name be specified with
283                 the -u switch. When adding a new user pdbedit will also
284                 ask for the password to be used</P
285 ><P
286 >Example: <B
287 CLASS="COMMAND"
288 >pdbedit -a -u sorce</B
289 >
290                 <TABLE
291 BORDER="0"
292 BGCOLOR="#E0E0E0"
293 WIDTH="90%"
294 ><TR
295 ><TD
296 ><PRE
297 CLASS="PROGRAMLISTING"
298 >new password:
299                 retype new password</PRE
300 ></TD
301 ></TR
302 ></TABLE
303 >
304                 </P
305 ></DD
306 ><DT
307 >-m</DT
308 ><DD
309 ><P
310 >This option may only be used in conjunction 
311                 with the <TT
312 CLASS="PARAMETER"
313 ><I
314 >-a</I
315 ></TT
316 > option. It will make
317                 pdbedit to add a machine trust account instead of a user
318                 account (-u username will provide the machine name).</P
319 ><P
320 >Example: <B
321 CLASS="COMMAND"
322 >pdbedit -a -m -u w2k-wks</B
323 >
324                 </P
325 ></DD
326 ><DT
327 >-x</DT
328 ><DD
329 ><P
330 >This option causes pdbedit to delete an account
331                 from the database. It need the username be specified with the
332                 -u switch.</P
333 ><P
334 >Example: <B
335 CLASS="COMMAND"
336 >pdbedit -x -u bob</B
337 ></P
338 ></DD
339 ><DT
340 >-i passdb-backend</DT
341 ><DD
342 ><P
343 >Use a different passdb backend to retrieve users than the one specified in smb.conf.</P
344 ><P
345 >This option will ease migration from one passdb backend to another.
346                 </P
347 ><P
348 >Example: <B
349 CLASS="COMMAND"
350 >pdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb</B
351 >
352                 </P
353 ></DD
354 ><DT
355 >-e passdb-backend</DT
356 ><DD
357 ><P
358 >Export all currently available users to the specified password database backend.</P
359 ><P
360 >This option will ease migration from one passdb backend to another and will ease backupping</P
361 ><P
362 >Example: <B
363 CLASS="COMMAND"
364 >pdbedit -e smbpasswd:/root/samba-users.backup</B
365 ></P
366 ></DD
367 ></DL
368 ></DIV
369 ></DIV
370 ><DIV
371 CLASS="REFSECT1"
372 ><A
373 NAME="AEN133"
374 ></A
375 ><H2
376 >NOTES</H2
377 ><P
378 >This command may be used only by root.</P
379 ></DIV
380 ><DIV
381 CLASS="REFSECT1"
382 ><A
383 NAME="AEN136"
384 ></A
385 ><H2
386 >VERSION</H2
387 ><P
388 >This man page is correct for version 2.2 of 
389         the Samba suite.</P
390 ></DIV
391 ><DIV
392 CLASS="REFSECT1"
393 ><A
394 NAME="AEN139"
395 ></A
396 ><H2
397 >SEE ALSO</H2
398 ><P
399 ><A
400 HREF="smbpasswd.8.html"
401 TARGET="_top"
402 >smbpasswd(8)</A
403 >, 
404         <A
405 HREF="samba.7.html"
406 TARGET="_top"
407 >samba(7)</A
408 >
409         </P
410 ></DIV
411 ><DIV
412 CLASS="REFSECT1"
413 ><A
414 NAME="AEN144"
415 ></A
416 ><H2
417 >AUTHOR</H2
418 ><P
419 >The original Samba software and related utilities 
420         were created by Andrew Tridgell. Samba is now developed
421         by the Samba Team as an Open Source project similar 
422         to the way the Linux kernel is developed.</P
423 ><P
424 >The original Samba man pages were written by Karl Auer. 
425         The man page sources were converted to YODL format (another 
426         excellent piece of Open Source software, available at
427         <A
428 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
429 TARGET="_top"
430 >       ftp://ftp.icce.rug.nl/pub/unix/</A
431 >) and updated for the Samba 2.0 
432         release by Jeremy Allison.  The conversion to DocBook for 
433         Samba 2.2 was done by Gerald Carter</P
434 ></DIV
435 ></BODY
436 ></HTML
437 >