set version string
[Samba.git] / docs / htmldocs / pdbedit.8.html
blobe3cf1e4fba50d8ee0e95cc39b3888c905f7ebcf5
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] [-b passdb-backend] [-d debuglevel] [-s configfile] [-P account-policy] [-V value]</P
38 ></DIV
39 ><DIV
40 CLASS="REFSECT1"
41 ><A
42 NAME="AEN30"
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="AEN37"
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
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
115 >Example: <B
116 CLASS="COMMAND"
117 >pdbedit -l -v</B
118 ></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
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
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
171 >Example: <B
172 CLASS="COMMAND"
173 >pdbedit -l -w</B
174 ></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
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
212 >This option can be used while adding or
213 modifing a user account. It will specify the user's full
214 name. </P
216 >Example: <B
217 CLASS="COMMAND"
218 >-f "Simo Sorce"</B
219 ></P
220 ></DD
221 ><DT
222 >-h homedir</DT
223 ><DD
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
229 >Example: <B
230 CLASS="COMMAND"
231 >-h "\\\\BERSERKER\\sorce"</B
234 ></DD
235 ><DT
236 >-D drive</DT
237 ><DD
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
243 >Example: <B
244 CLASS="COMMAND"
245 >-d "H:"</B
248 ></DD
249 ><DT
250 >-S script</DT
251 ><DD
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
257 >Example: <B
258 CLASS="COMMAND"
259 >-s "\\\\BERSERKER\\netlogon\\sorce.bat"</B
262 ></DD
263 ><DT
264 >-p profile</DT
265 ><DD
267 >This option can be used while adding or
268 modifing a user account. It will specify the user's profile
269 directory.</P
271 >Example: <B
272 CLASS="COMMAND"
273 >-p "\\\\BERSERKER\\netlogon"</B
276 ></DD
277 ><DT
278 >-a</DT
279 ><DD
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
286 >Example: <B
287 CLASS="COMMAND"
288 >pdbedit -a -u sorce</B
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
305 ></DD
306 ><DT
307 >-m</DT
308 ><DD
310 >This option may only be used in conjunction
311 with the <TT
312 CLASS="PARAMETER"
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
320 >Example: <B
321 CLASS="COMMAND"
322 >pdbedit -a -m -u w2k-wks</B
325 ></DD
326 ><DT
327 >-x</DT
328 ><DD
330 >This option causes pdbedit to delete an account
331 from the database. It needs a username specified with the
332 -u switch.</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
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
347 >This option will ease migration from one passdb backend to
348 another.</P
350 >Example: <B
351 CLASS="COMMAND"
352 >pdbedit -i smbpasswd:/etc/smbpasswd.old
354 ></P
355 ></DD
356 ><DT
357 >-e passdb-backend</DT
358 ><DD
360 >Exports all currently available users to the
361 specified password database backend.</P
363 >This option will ease migration from one passdb backend to
364 another and will ease backing up.</P
366 >Example: <B
367 CLASS="COMMAND"
368 >pdbedit -e smbpasswd:/root/samba-users.backup</B
369 ></P
370 ></DD
371 ><DT
372 >-b passdb-backend</DT
373 ><DD
375 >Use a different default passdb backend. </P
377 >Example: <B
378 CLASS="COMMAND"
379 >pdbedit -b xml:/root/pdb-backup.xml -l</B
380 ></P
381 ></DD
382 ><DT
383 >-P account-policy</DT
384 ><DD
386 >Display an account policy</P
388 >Valid policies are: minimum password age, reset count minutes, disconnect time,
389 user must logon to change password, password history, lockout duration, min password length,
390 maximum password age and bad lockout attempt.</P
392 >Example: <B
393 CLASS="COMMAND"
394 >pdbedit -P "bad lockout attempt"</B
395 ></P
397 ><TABLE
398 BORDER="0"
399 BGCOLOR="#E0E0E0"
400 WIDTH="90%"
401 ><TR
402 ><TD
403 ><PRE
404 CLASS="PROGRAMLISTING"
405 > account policy value for bad lockout attempt is 0
406 </PRE
407 ></TD
408 ></TR
409 ></TABLE
410 ></P
411 ></DD
412 ><DT
413 >-V account-policy-value</DT
414 ><DD
416 >Sets an account policy to a specified value.
417 This option may only be used in conjunction
418 with the <TT
419 CLASS="PARAMETER"
421 >-P</I
422 ></TT
423 > option.
426 >Example: <B
427 CLASS="COMMAND"
428 >pdbedit -P "bad lockout attempt" -V 3</B
429 ></P
431 ><TABLE
432 BORDER="0"
433 BGCOLOR="#E0E0E0"
434 WIDTH="90%"
435 ><TR
436 ><TD
437 ><PRE
438 CLASS="PROGRAMLISTING"
439 > account policy value for bad lockout attempt was 0
440 account policy value for bad lockout attempt is now 3
441 </PRE
442 ></TD
443 ></TR
444 ></TABLE
445 ></P
446 ></DD
447 ><DT
448 >-d|--debug=debuglevel</DT
449 ><DD
451 ><TT
452 CLASS="REPLACEABLE"
454 >debuglevel</I
455 ></TT
456 > is an integer
457 from 0 to 10. The default value if this parameter is
458 not specified is zero.</P
460 >The higher this value, the more detail will be
461 logged to the log files about the activities of the
462 server. At level 0, only critical errors and serious
463 warnings will be logged. Level 1 is a reasonable level for
464 day to day running - it generates a small amount of
465 information about operations carried out.</P
467 >Levels above 1 will generate considerable
468 amounts of log data, and should only be used when
469 investigating a problem. Levels above 3 are designed for
470 use only by developers and generate HUGE amounts of log
471 data, most of which is extremely cryptic.</P
473 >Note that specifying this parameter here will
474 override the <A
475 HREF="smb.conf.5.html#loglevel"
476 TARGET="_top"
477 >log
478 level</A
479 > parameter in the <A
480 HREF="smb.conf.5.html"
481 TARGET="_top"
482 ><TT
483 CLASS="FILENAME"
484 >smb.conf(5)</TT
485 ></A
486 > file.</P
487 ></DD
488 ><DT
489 >-h|--help</DT
490 ><DD
492 >Print a summary of command line options.</P
493 ></DD
494 ><DT
495 >-s &#60;configuration file&#62;</DT
496 ><DD
498 >The file specified contains the
499 configuration details required by the server. The
500 information in this file includes server-specific
501 information such as what printcap file to use, as well
502 as descriptions of all the services that the server is
503 to provide. See <A
504 HREF="smb.conf.5.html"
505 TARGET="_top"
506 ><TT
507 CLASS="FILENAME"
508 >smb.conf(5)</TT
509 ></A
510 > for more information.
511 The default configuration file name is determined at
512 compile time.</P
513 ></DD
514 ></DL
515 ></DIV
516 ></DIV
517 ><DIV
518 CLASS="REFSECT1"
520 NAME="AEN182"
521 ></A
522 ><H2
523 >NOTES</H2
525 >This command may be used only by root.</P
526 ></DIV
527 ><DIV
528 CLASS="REFSECT1"
530 NAME="AEN185"
531 ></A
532 ><H2
533 >VERSION</H2
535 >This man page is correct for version 2.2 of
536 the Samba suite.</P
537 ></DIV
538 ><DIV
539 CLASS="REFSECT1"
541 NAME="AEN188"
542 ></A
543 ><H2
544 >SEE ALSO</H2
547 HREF="smbpasswd.8.html"
548 TARGET="_top"
549 >smbpasswd(8)</A
552 HREF="samba.7.html"
553 TARGET="_top"
554 >samba(7)</A
557 ></DIV
558 ><DIV
559 CLASS="REFSECT1"
561 NAME="AEN193"
562 ></A
563 ><H2
564 >AUTHOR</H2
566 >The original Samba software and related utilities
567 were created by Andrew Tridgell. Samba is now developed
568 by the Samba Team as an Open Source project similar
569 to the way the Linux kernel is developed.</P
571 >The original Samba man pages were written by Karl Auer.
572 The man page sources were converted to YODL format (another
573 excellent piece of Open Source software, available at
575 HREF="ftp://ftp.icce.rug.nl/pub/unix/"
576 TARGET="_top"
577 > ftp://ftp.icce.rug.nl/pub/unix/</A
578 >) and updated for the Samba 2.0
579 release by Jeremy Allison. The conversion to DocBook for
580 Samba 2.2 was done by Gerald Carter</P
581 ></DIV
582 ></BODY
583 ></HTML