'make everything' in docs
[nivanova/samba-autobuild/.git] / docs / htmldocs / pdbedit.8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >pdbedit</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.77"></HEAD
9 ><BODY
10 CLASS="REFENTRY"
11 BGCOLOR="#FFFFFF"
12 TEXT="#000000"
13 LINK="#0000FF"
14 VLINK="#840084"
15 ALINK="#0000FF"
16 ><H1
17 ><A
18 NAME="PDBEDIT"
19 ></A
20 >pdbedit</H1
21 ><DIV
22 CLASS="REFNAMEDIV"
23 ><A
24 NAME="AEN5"
25 ></A
26 ><H2
27 >Name</H2
28 >pdbedit&nbsp;--&nbsp;manage the SAM database</DIV
29 ><DIV
30 CLASS="REFSYNOPSISDIV"
31 ><A
32 NAME="AEN8"
33 ></A
34 ><H2
35 >Synopsis</H2
36 ><P
37 ><B
38 CLASS="COMMAND"
39 >pdbedit</B
40 >  [-l] [-v] [-w] [-u username] [-f fullname] [-h homedir] [-D drive] [-S script] [-p profile] [-a] [-m] [-x] [-i passdb-backend] [-e passdb-backend] [-b passdb-backend] [-d debuglevel] [-s configfile] [-P account-policy] [-V value]</P
41 ></DIV
42 ><DIV
43 CLASS="REFSECT1"
44 ><A
45 NAME="AEN30"
46 ></A
47 ><H2
48 >DESCRIPTION</H2
49 ><P
50 >This tool is part of the <A
51 HREF="samba.7.html"
52 TARGET="_top"
53 >       Samba</A
54 > suite.</P
55 ><P
56 >The pdbedit program is used to manage the users accounts
57         stored in the sam database and can only be run by root.</P
58 ><P
59 >The pdbedit tool uses the passdb modular interface and is
60         independent from the kind of users database used (currently there
61         are smbpasswd, ldap, nis+ and tdb based and more can be added
62         without changing the tool).</P
63 ><P
64 >There are five main ways to use pdbedit: adding a user account,
65         removing a user account, modifing a user account, listing user
66         accounts, importing users accounts.</P
67 ></DIV
68 ><DIV
69 CLASS="REFSECT1"
70 ><A
71 NAME="AEN37"
72 ></A
73 ><H2
74 >OPTIONS</H2
75 ><P
76 ></P
77 ><DIV
78 CLASS="VARIABLELIST"
79 ><DL
80 ><DT
81 >-l</DT
82 ><DD
83 ><P
84 >This option lists all the user accounts
85                 present in the users database.
86                 This option prints a list of user/uid pairs separated by
87                 the ':' character.</P
88 ><P
89 >Example: <B
90 CLASS="COMMAND"
91 >pdbedit -l</B
92 ></P
93 ><P
94 ><PRE
95 CLASS="PROGRAMLISTING"
96 >               sorce:500:Simo Sorce
97                 samba:45:Test User
98                 </PRE
99 ></P
100 ></DD
101 ><DT
102 >-v</DT
103 ><DD
104 ><P
105 >This option enables the verbose listing format.
106                 It causes pdbedit to list the users in the database, printing
107                 out the account fields in a descriptive format.</P
108 ><P
109 >Example: <B
110 CLASS="COMMAND"
111 >pdbedit -l -v</B
112 ></P
113 ><P
114 ><PRE
115 CLASS="PROGRAMLISTING"
116 >               ---------------
117                 username:       sorce
118                 user ID/Group:  500/500
119                 user RID/GRID:  2000/2001
120                 Full Name:      Simo Sorce
121                 Home Directory: \\BERSERKER\sorce
122                 HomeDir Drive:  H:
123                 Logon Script:   \\BERSERKER\netlogon\sorce.bat
124                 Profile Path:   \\BERSERKER\profile
125                 ---------------
126                 username:       samba
127                 user ID/Group:  45/45
128                 user RID/GRID:  1090/1091
129                 Full Name:      Test User
130                 Home Directory: \\BERSERKER\samba
131                 HomeDir Drive:  
132                 Logon Script:   
133                 Profile Path:   \\BERSERKER\profile
134                 </PRE
135 ></P
136 ></DD
137 ><DT
138 >-w</DT
139 ><DD
140 ><P
141 >This option sets the "smbpasswd" listing format.
142                 It will make pdbedit list the users in the database, printing
143                 out the account fields in a format compatible with the
144                 <TT
145 CLASS="FILENAME"
146 >smbpasswd</TT
147 > file format. (see the <A
148 HREF="smbpasswd.5.html"
149 TARGET="_top"
150 ><TT
151 CLASS="FILENAME"
152 >smbpasswd(5)</TT
153 ></A
154 > for details)</P
155 ><P
156 >Example: <B
157 CLASS="COMMAND"
158 >pdbedit -l -w</B
159 ></P
160 ><P
161 ><PRE
162 CLASS="PROGRAMLISTING"
163 >               sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
164                 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
165                 </PRE
166 ></P
167 ></DD
168 ><DT
169 >-u username</DT
170 ><DD
171 ><P
172 >This option specifies the username to be
173                 used for the operation requested (listing, adding, removing).
174                 It is <SPAN
175 CLASS="emphasis"
176 ><I
177 CLASS="EMPHASIS"
178 >required</I
179 ></SPAN
180 > in add, remove and modify
181                 operations and <SPAN
182 CLASS="emphasis"
183 ><I
184 CLASS="EMPHASIS"
185 >optional</I
186 ></SPAN
187 > in list
188                 operations.</P
189 ></DD
190 ><DT
191 >-f fullname</DT
192 ><DD
193 ><P
194 >This option can be used while adding or
195                 modifing a user account. It will specify the user's full
196                 name. </P
197 ><P
198 >Example: <B
199 CLASS="COMMAND"
200 >-f "Simo Sorce"</B
201 ></P
202 ></DD
203 ><DT
204 >-h homedir</DT
205 ><DD
206 ><P
207 >This option can be used while adding or
208                 modifing a user account. It will specify the user's home
209                 directory network path.</P
210 ><P
211 >Example: <B
212 CLASS="COMMAND"
213 >-h "\\\\BERSERKER\\sorce"</B
214 >
215                 </P
216 ></DD
217 ><DT
218 >-D drive</DT
219 ><DD
220 ><P
221 >This option can be used while adding or
222                 modifing a user account. It will specify the windows drive
223                 letter to be used to map the home directory.</P
224 ><P
225 >Example: <B
226 CLASS="COMMAND"
227 >-d "H:"</B
228 >
229                 </P
230 ></DD
231 ><DT
232 >-S script</DT
233 ><DD
234 ><P
235 >This option can be used while adding or
236                 modifing a user account. It will specify the user's logon
237                 script path.</P
238 ><P
239 >Example: <B
240 CLASS="COMMAND"
241 >-s "\\\\BERSERKER\\netlogon\\sorce.bat"</B
242 >
243                 </P
244 ></DD
245 ><DT
246 >-p profile</DT
247 ><DD
248 ><P
249 >This option can be used while adding or
250                 modifing a user account. It will specify the user's profile
251                 directory.</P
252 ><P
253 >Example: <B
254 CLASS="COMMAND"
255 >-p "\\\\BERSERKER\\netlogon"</B
256 >
257                 </P
258 ></DD
259 ><DT
260 >-a</DT
261 ><DD
262 ><P
263 >This option is used to add a user into the
264                 database. This command needs a user name specified with
265                 the -u switch. When adding a new user, pdbedit will also
266                 ask for the password to be used.</P
267 ><P
268 >Example: <B
269 CLASS="COMMAND"
270 >pdbedit -a -u sorce</B
271 >
272                 <PRE
273 CLASS="PROGRAMLISTING"
274 >new password:
275                 retype new password</PRE
276 >
277                 </P
278 ></DD
279 ><DT
280 >-m</DT
281 ><DD
282 ><P
283 >This option may only be used in conjunction 
284                 with the <TT
285 CLASS="PARAMETER"
286 ><I
287 >-a</I
288 ></TT
289 > option. It will make
290                 pdbedit to add a machine trust account instead of a user
291                 account (-u username will provide the machine name).</P
292 ><P
293 >Example: <B
294 CLASS="COMMAND"
295 >pdbedit -a -m -u w2k-wks</B
296 >
297                 </P
298 ></DD
299 ><DT
300 >-x</DT
301 ><DD
302 ><P
303 >This option causes pdbedit to delete an account
304                 from the database. It needs a username specified with the
305                 -u switch.</P
306 ><P
307 >Example: <B
308 CLASS="COMMAND"
309 >pdbedit -x -u bob</B
310 ></P
311 ></DD
312 ><DT
313 >-i passdb-backend</DT
314 ><DD
315 ><P
316 >Use a different passdb backend to retrieve users
317                 than the one specified in smb.conf. Can be used to import data into
318                 your local user database.</P
319 ><P
320 >This option will ease migration from one passdb backend to
321                 another.</P
322 ><P
323 >Example: <B
324 CLASS="COMMAND"
325 >pdbedit -i smbpasswd:/etc/smbpasswd.old
326                 </B
327 ></P
328 ></DD
329 ><DT
330 >-e passdb-backend</DT
331 ><DD
332 ><P
333 >Exports all currently available users to the
334                 specified password database backend.</P
335 ><P
336 >This option will ease migration from one passdb backend to
337                 another and will ease backing up.</P
338 ><P
339 >Example: <B
340 CLASS="COMMAND"
341 >pdbedit -e smbpasswd:/root/samba-users.backup</B
342 ></P
343 ></DD
344 ><DT
345 >-b passdb-backend</DT
346 ><DD
347 ><P
348 >Use a different default passdb backend. </P
349 ><P
350 >Example: <B
351 CLASS="COMMAND"
352 >pdbedit -b xml:/root/pdb-backup.xml -l</B
353 ></P
354 ></DD
355 ><DT
356 >-P account-policy</DT
357 ><DD
358 ><P
359 >Display an account policy</P
360 ><P
361 >Valid policies are: minimum password age, reset count minutes, disconnect time,
362                 user must logon to change password, password history, lockout duration, min password length,
363                 maximum password age and bad lockout attempt.
364
365                 </P
366 ><P
367 >Example: <B
368 CLASS="COMMAND"
369 >pdbedit -P "bad lockout attempt"</B
370 ></P
371 ><P
372 ><PRE
373 CLASS="PROGRAMLISTING"
374 >               account policy value for bad lockout attempt is 0
375                 </PRE
376 ></P
377 ></DD
378 ><DT
379 >-V account-policy-value</DT
380 ><DD
381 ><P
382 >Sets an account policy to a specified value. 
383                 This option may only be used in conjunction
384                 with the <TT
385 CLASS="PARAMETER"
386 ><I
387 >-P</I
388 ></TT
389 > option.
390
391                 </P
392 ><P
393 >Example: <B
394 CLASS="COMMAND"
395 >pdbedit -P "bad lockout attempt" -V 3</B
396 ></P
397 ><P
398 ><PRE
399 CLASS="PROGRAMLISTING"
400 >               account policy value for bad lockout attempt was 0
401                 account policy value for bad lockout attempt is now 3
402                 </PRE
403 ></P
404 ></DD
405 ><DT
406 >-d|--debug=debuglevel</DT
407 ><DD
408 ><P
409 ><TT
410 CLASS="REPLACEABLE"
411 ><I
412 >debuglevel</I
413 ></TT
414 > is an integer 
415 from 0 to 10.  The default value if this parameter is 
416 not specified is zero.</P
417 ><P
418 >The higher this value, the more detail will be 
419 logged to the log files about the activities of the 
420 server. At level 0, only critical errors and serious 
421 warnings will be logged. Level 1 is a reasonable level for
422 day to day running - it generates a small amount of 
423 information about operations carried out.</P
424 ><P
425 >Levels above 1 will generate considerable 
426 amounts of log data, and should only be used when 
427 investigating a problem. Levels above 3 are designed for 
428 use only by developers and generate HUGE amounts of log
429 data, most of which is extremely cryptic.</P
430 ><P
431 >Note that specifying this parameter here will 
432 override the <A
433 HREF="smb.conf.5.html#loglevel"
434 TARGET="_top"
435 >log
436 level</A
437 > parameter in the <A
438 HREF="smb.conf.5.html"
439 TARGET="_top"
440 ><TT
441 CLASS="FILENAME"
442 >smb.conf(5)</TT
443 ></A
444 > file.</P
445 ></DD
446 ><DT
447 >-h|--help</DT
448 ><DD
449 ><P
450 >Print a summary of command line options.</P
451 ></DD
452 ><DT
453 >-s &lt;configuration file&gt;</DT
454 ><DD
455 ><P
456 >The file specified contains the 
457 configuration details required by the server.  The 
458 information in this file includes server-specific
459 information such as what printcap file to use, as well 
460 as descriptions of all the services that the server is 
461 to provide. See <A
462 HREF="smb.conf.5.html"
463 TARGET="_top"
464 ><TT
465 CLASS="FILENAME"
466 >smb.conf(5)</TT
467 ></A
468 > for more information.
469 The default configuration file name is determined at 
470 compile time.</P
471 ></DD
472 ></DL
473 ></DIV
474 ></DIV
475 ><DIV
476 CLASS="REFSECT1"
477 ><A
478 NAME="AEN182"
479 ></A
480 ><H2
481 >NOTES</H2
482 ><P
483 >This command may be used only by root.</P
484 ></DIV
485 ><DIV
486 CLASS="REFSECT1"
487 ><A
488 NAME="AEN185"
489 ></A
490 ><H2
491 >VERSION</H2
492 ><P
493 >This man page is correct for version 2.2 of 
494         the Samba suite.</P
495 ></DIV
496 ><DIV
497 CLASS="REFSECT1"
498 ><A
499 NAME="AEN188"
500 ></A
501 ><H2
502 >SEE ALSO</H2
503 ><P
504 ><A
505 HREF="smbpasswd.8.html"
506 TARGET="_top"
507 >smbpasswd(8)</A
508 >, 
509         <A
510 HREF="samba.7.html"
511 TARGET="_top"
512 >samba(7)</A
513 >
514         </P
515 ></DIV
516 ><DIV
517 CLASS="REFSECT1"
518 ><A
519 NAME="AEN193"
520 ></A
521 ><H2
522 >AUTHOR</H2
523 ><P
524 >The original Samba software and related utilities 
525         were created by Andrew Tridgell. Samba is now developed
526         by the Samba Team as an Open Source project similar 
527         to the way the Linux kernel is developed.</P
528 ><P
529 >The original Samba man pages were written by Karl Auer. 
530         The man page sources were converted to YODL format (another 
531         excellent piece of Open Source software, available at
532         <A
533 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
534 TARGET="_top"
535 >       ftp://ftp.icce.rug.nl/pub/unix/</A
536 >) and updated for the Samba 2.0 
537         release by Jeremy Allison.  The conversion to DocBook for 
538         Samba 2.2 was done by Gerald Carter</P
539 ></DIV
540 ></BODY
541 ></HTML
542 >