This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / docs / htmldocs / pdbedit.8.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >pdbedit</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
9 "></HEAD
10 ><BODY
11 CLASS="REFENTRY"
12 BGCOLOR="#FFFFFF"
13 TEXT="#000000"
14 LINK="#0000FF"
15 VLINK="#840084"
16 ALINK="#0000FF"
17 ><H1
18 ><A
19 NAME="PDBEDIT">pdbedit</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"><H2
32 >Synopsis</H2
33 ><P
34 ><B
35 CLASS="COMMAND"
36 >pdbedit</B
37 > [-l] [-v] [-w] [-u username] [-f fullname] [-h homedir] [-D drive] [-S script] [-p profile] [-a] [-m] [-x] [-i passdb-backend] [-e passdb-backend] [-g] [-b passdb-backend] [-d debuglevel] [-s configfile] [-P account-policy] [-V value]</P
38 ></DIV
39 ><DIV
40 CLASS="REFSECT1"
41 ><A
42 NAME="AEN31"
43 ></A
44 ><H2
45 >DESCRIPTION</H2
46 ><P
47 >This tool is part of the <A
48 HREF="samba.7.html"
49 TARGET="_top"
50 >       Samba</A
51 > suite.</P
52 ><P
53 >The pdbedit program is used to manage the users accounts
54         stored in the sam database and can only be run by root.</P
55 ><P
56 >The pdbedit tool uses the passdb modular interface and is
57         independent from the kind of users database used (currently there
58         are smbpasswd, ldap, nis+ and tdb based and more can be added
59         without changing the tool).</P
60 ><P
61 >There are five main ways to use pdbedit: adding a user account,
62         removing a user account, modifing a user account, listing user
63         accounts, importing users accounts.</P
64 ></DIV
65 ><DIV
66 CLASS="REFSECT1"
67 ><A
68 NAME="AEN38"
69 ></A
70 ><H2
71 >OPTIONS</H2
72 ><P
73 ></P
74 ><DIV
75 CLASS="VARIABLELIST"
76 ><DL
77 ><DT
78 >-l</DT
79 ><DD
80 ><P
81 >This option lists all the user accounts
82                 present in the users database.
83                 This option prints a list of user/uid pairs separated by
84                 the ':' character.</P
85 ><P
86 >Example: <B
87 CLASS="COMMAND"
88 >pdbedit -l</B
89 ></P
90 ><P
91 ><TABLE
92 BORDER="0"
93 BGCOLOR="#E0E0E0"
94 WIDTH="90%"
95 ><TR
96 ><TD
97 ><PRE
98 CLASS="PROGRAMLISTING"
99 >               sorce:500:Simo Sorce
100                 samba:45:Test User
101                 </PRE
102 ></TD
103 ></TR
104 ></TABLE
105 ></P
106 ></DD
107 ><DT
108 >-v</DT
109 ><DD
110 ><P
111 >This option enables the verbose listing format.
112                 It causes pdbedit to list the users in the database, printing
113                 out the account fields in a descriptive format.</P
114 ><P
115 >Example: <B
116 CLASS="COMMAND"
117 >pdbedit -l -v</B
118 ></P
119 ><P
120 ><TABLE
121 BORDER="0"
122 BGCOLOR="#E0E0E0"
123 WIDTH="90%"
124 ><TR
125 ><TD
126 ><PRE
127 CLASS="PROGRAMLISTING"
128 >               ---------------
129                 username:       sorce
130                 user ID/Group:  500/500
131                 user RID/GRID:  2000/2001
132                 Full Name:      Simo Sorce
133                 Home Directory: \\BERSERKER\sorce
134                 HomeDir Drive:  H:
135                 Logon Script:   \\BERSERKER\netlogon\sorce.bat
136                 Profile Path:   \\BERSERKER\profile
137                 ---------------
138                 username:       samba
139                 user ID/Group:  45/45
140                 user RID/GRID:  1090/1091
141                 Full Name:      Test User
142                 Home Directory: \\BERSERKER\samba
143                 HomeDir Drive:  
144                 Logon Script:   
145                 Profile Path:   \\BERSERKER\profile
146                 </PRE
147 ></TD
148 ></TR
149 ></TABLE
150 ></P
151 ></DD
152 ><DT
153 >-w</DT
154 ><DD
155 ><P
156 >This option sets the "smbpasswd" listing format.
157                 It will make pdbedit list the users in the database, printing
158                 out the account fields in a format compatible with the
159                 <TT
160 CLASS="FILENAME"
161 >smbpasswd</TT
162 > file format. (see the <A
163 HREF="smbpasswd.5.html"
164 TARGET="_top"
165 ><TT
166 CLASS="FILENAME"
167 >smbpasswd(5)</TT
168 ></A
169 > for details)</P
170 ><P
171 >Example: <B
172 CLASS="COMMAND"
173 >pdbedit -l -w</B
174 ></P
175 ><P
176 ><TABLE
177 BORDER="0"
178 BGCOLOR="#E0E0E0"
179 WIDTH="90%"
180 ><TR
181 ><TD
182 ><PRE
183 CLASS="PROGRAMLISTING"
184 >               sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
185                 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
186                 </PRE
187 ></TD
188 ></TR
189 ></TABLE
190 ></P
191 ></DD
192 ><DT
193 >-u username</DT
194 ><DD
195 ><P
196 >This option specifies the username to be
197                 used for the operation requested (listing, adding, removing).
198                 It is <I
199 CLASS="EMPHASIS"
200 >required</I
201 > in add, remove and modify
202                 operations and <I
203 CLASS="EMPHASIS"
204 >optional</I
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 needs a user name 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 needs a username 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
344                 than the one specified in smb.conf. Can be used to import data into
345                 your local user database.</P
346 ><P
347 >This option will ease migration from one passdb backend to
348                 another.</P
349 ><P
350 >Example: <B
351 CLASS="COMMAND"
352 >pdbedit -i smbpasswd:/etc/smbpasswd.old
353                 </B
354 ></P
355 ></DD
356 ><DT
357 >-e passdb-backend</DT
358 ><DD
359 ><P
360 >Exports all currently available users to the
361                 specified password database backend.</P
362 ><P
363 >This option will ease migration from one passdb backend to
364                 another and will ease backing up.</P
365 ><P
366 >Example: <B
367 CLASS="COMMAND"
368 >pdbedit -e smbpasswd:/root/samba-users.backup</B
369 ></P
370 ></DD
371 ><DT
372 >-g</DT
373 ><DD
374 ><P
375 >If you specify <TT
376 CLASS="PARAMETER"
377 ><I
378 >-g</I
379 ></TT
380 >,
381                 then <TT
382 CLASS="PARAMETER"
383 ><I
384 >-i in-backend -e out-backend</I
385 ></TT
386 >
387                 applies to the group mapping instead of the user database.
388                 </P
389 ><P
390 >This option will ease migration from one passdb backend to
391                 another and will ease backing up.</P
392 ></DD
393 ><DT
394 >-b passdb-backend</DT
395 ><DD
396 ><P
397 >Use a different default passdb backend. </P
398 ><P
399 >Example: <B
400 CLASS="COMMAND"
401 >pdbedit -b xml:/root/pdb-backup.xml -l</B
402 ></P
403 ></DD
404 ><DT
405 >-P account-policy</DT
406 ><DD
407 ><P
408 >Display an account policy</P
409 ><P
410 >Valid policies are: minimum password age, reset count minutes, disconnect time,
411                 user must logon to change password, password history, lockout duration, min password length,
412                 maximum password age and bad lockout attempt.</P
413 ><P
414 >Example: <B
415 CLASS="COMMAND"
416 >pdbedit -P "bad lockout attempt"</B
417 ></P
418 ><P
419 ><TABLE
420 BORDER="0"
421 BGCOLOR="#E0E0E0"
422 WIDTH="90%"
423 ><TR
424 ><TD
425 ><PRE
426 CLASS="PROGRAMLISTING"
427 >               account policy value for bad lockout attempt is 0
428                 </PRE
429 ></TD
430 ></TR
431 ></TABLE
432 ></P
433 ></DD
434 ><DT
435 >-V account-policy-value</DT
436 ><DD
437 ><P
438 >Sets an account policy to a specified value. 
439                 This option may only be used in conjunction
440                 with the <TT
441 CLASS="PARAMETER"
442 ><I
443 >-P</I
444 ></TT
445 > option.
446                 </P
447 ><P
448 >Example: <B
449 CLASS="COMMAND"
450 >pdbedit -P "bad lockout attempt" -V 3</B
451 ></P
452 ><P
453 ><TABLE
454 BORDER="0"
455 BGCOLOR="#E0E0E0"
456 WIDTH="90%"
457 ><TR
458 ><TD
459 ><PRE
460 CLASS="PROGRAMLISTING"
461 >               account policy value for bad lockout attempt was 0
462                 account policy value for bad lockout attempt is now 3
463                 </PRE
464 ></TD
465 ></TR
466 ></TABLE
467 ></P
468 ></DD
469 ><DT
470 >-d|--debug=debuglevel</DT
471 ><DD
472 ><P
473 ><TT
474 CLASS="REPLACEABLE"
475 ><I
476 >debuglevel</I
477 ></TT
478 > is an integer 
479 from 0 to 10.  The default value if this parameter is 
480 not specified is zero.</P
481 ><P
482 >The higher this value, the more detail will be 
483 logged to the log files about the activities of the 
484 server. At level 0, only critical errors and serious 
485 warnings will be logged. Level 1 is a reasonable level for
486 day to day running - it generates a small amount of 
487 information about operations carried out.</P
488 ><P
489 >Levels above 1 will generate considerable 
490 amounts of log data, and should only be used when 
491 investigating a problem. Levels above 3 are designed for 
492 use only by developers and generate HUGE amounts of log
493 data, most of which is extremely cryptic.</P
494 ><P
495 >Note that specifying this parameter here will 
496 override the <A
497 HREF="smb.conf.5.html#loglevel"
498 TARGET="_top"
499 >log
500 level</A
501 > parameter in the <A
502 HREF="smb.conf.5.html"
503 TARGET="_top"
504 ><TT
505 CLASS="FILENAME"
506 >smb.conf(5)</TT
507 ></A
508 > file.</P
509 ></DD
510 ><DT
511 >-h|--help</DT
512 ><DD
513 ><P
514 >Print a summary of command line options.</P
515 ></DD
516 ><DT
517 >-s &#60;configuration file&#62;</DT
518 ><DD
519 ><P
520 >The file specified contains the 
521 configuration details required by the server.  The 
522 information in this file includes server-specific
523 information such as what printcap file to use, as well 
524 as descriptions of all the services that the server is 
525 to provide. See <A
526 HREF="smb.conf.5.html"
527 TARGET="_top"
528 ><TT
529 CLASS="FILENAME"
530 >smb.conf(5)</TT
531 ></A
532 > for more information.
533 The default configuration file name is determined at 
534 compile time.</P
535 ></DD
536 ></DL
537 ></DIV
538 ></DIV
539 ><DIV
540 CLASS="REFSECT1"
541 ><A
542 NAME="AEN190"
543 ></A
544 ><H2
545 >NOTES</H2
546 ><P
547 >This command may be used only by root.</P
548 ></DIV
549 ><DIV
550 CLASS="REFSECT1"
551 ><A
552 NAME="AEN193"
553 ></A
554 ><H2
555 >VERSION</H2
556 ><P
557 >This man page is correct for version 2.2 of 
558         the Samba suite.</P
559 ></DIV
560 ><DIV
561 CLASS="REFSECT1"
562 ><A
563 NAME="AEN196"
564 ></A
565 ><H2
566 >SEE ALSO</H2
567 ><P
568 ><A
569 HREF="smbpasswd.8.html"
570 TARGET="_top"
571 >smbpasswd(8)</A
572 >, 
573         <A
574 HREF="samba.7.html"
575 TARGET="_top"
576 >samba(7)</A
577 >
578         </P
579 ></DIV
580 ><DIV
581 CLASS="REFSECT1"
582 ><A
583 NAME="AEN201"
584 ></A
585 ><H2
586 >AUTHOR</H2
587 ><P
588 >The original Samba software and related utilities 
589         were created by Andrew Tridgell. Samba is now developed
590         by the Samba Team as an Open Source project similar 
591         to the way the Linux kernel is developed.</P
592 ><P
593 >The original Samba man pages were written by Karl Auer. 
594         The man page sources were converted to YODL format (another 
595         excellent piece of Open Source software, available at
596         <A
597 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
598 TARGET="_top"
599 >       ftp://ftp.icce.rug.nl/pub/unix/</A
600 >) and updated for the Samba 2.0 
601         release by Jeremy Allison.  The conversion to DocBook for 
602         Samba 2.2 was done by Gerald Carter</P
603 ></DIV
604 ></BODY
605 ></HTML
606 >