source: branches/samba-3.3.x/docs/manpages/pdbedit.8@ 403

Last change on this file since 403 was 368, checked in by Herwig Bauernfeind, 16 years ago

Update Samba 3.3 to 3.3.10 (docs)

File size: 12.8 KB
Line 
1'\" t
2.\" Title: pdbedit
3.\" Author: [see the "AUTHOR" section]
4.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5.\" Date: 01/14/2010
6.\" Manual: System Administration tools
7.\" Source: Samba 3.3
8.\" Language: English
9.\"
10.TH "PDBEDIT" "8" "01/14/2010" "Samba 3\&.3" "System Administration tools"
11.\" -----------------------------------------------------------------
12.\" * set default formatting
13.\" -----------------------------------------------------------------
14.\" disable hyphenation
15.nh
16.\" disable justification (adjust text to left margin only)
17.ad l
18.\" -----------------------------------------------------------------
19.\" * MAIN CONTENT STARTS HERE *
20.\" -----------------------------------------------------------------
21.SH "NAME"
22pdbedit \- manage the SAM database (Database of Samba Users)
23.SH "SYNOPSIS"
24.HP \w'\ 'u
25pdbedit [\-L] [\-v] [\-w] [\-u\ username] [\-f\ fullname] [\-h\ homedir] [\-D\ drive] [\-S\ script] [\-p\ profile] [\-a] [\-t,\ \-\-password\-from\-stdin] [\-m] [\-r] [\-x] [\-i\ passdb\-backend] [\-e\ passdb\-backend] [\-b\ passdb\-backend] [\-g] [\-d\ debuglevel] [\-s\ configfile] [\-P\ account\-policy] [\-C\ value] [\-c\ account\-control] [\-y]
26.SH "DESCRIPTION"
27.PP
28This tool is part of the
29\fBsamba\fR(7)
30suite\&.
31.PP
32The pdbedit program is used to manage the users accounts stored in the sam database and can only be run by root\&.
33.PP
34The pdbedit tool uses the passdb modular interface and is independent from the kind of users database used (currently there are smbpasswd, ldap, nis+ and tdb based and more can be added without changing the tool)\&.
35.PP
36There are five main ways to use pdbedit: adding a user account, removing a user account, modifing a user account, listing user accounts, importing users accounts\&.
37.SH "OPTIONS"
38.PP
39\-L
40.RS 4
41This option lists all the user accounts present in the users database\&. This option prints a list of user/uid pairs separated by the \':\' character\&.
42.sp
43Example:
44pdbedit \-L
45.sp
46.if n \{\
47.RS 4
48.\}
49.nf
50sorce:500:Simo Sorce
51samba:45:Test User
52.fi
53.if n \{\
54.RE
55.\}
56.RE
57.PP
58\-v
59.RS 4
60This option enables the verbose listing format\&. It causes pdbedit to list the users in the database, printing out the account fields in a descriptive format\&.
61.sp
62Example:
63pdbedit \-L \-v
64.sp
65.if n \{\
66.RS 4
67.\}
68.nf
69\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
70username: sorce
71user ID/Group: 500/500
72user RID/GRID: 2000/2001
73Full Name: Simo Sorce
74Home Directory: \e\eBERSERKER\esorce
75HomeDir Drive: H:
76Logon Script: \e\eBERSERKER\enetlogon\esorce\&.bat
77Profile Path: \e\eBERSERKER\eprofile
78\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
79username: samba
80user ID/Group: 45/45
81user RID/GRID: 1090/1091
82Full Name: Test User
83Home Directory: \e\eBERSERKER\esamba
84HomeDir Drive:
85Logon Script:
86Profile Path: \e\eBERSERKER\eprofile
87.fi
88.if n \{\
89.RE
90.\}
91.RE
92.PP
93\-w
94.RS 4
95This option sets the "smbpasswd" listing format\&. It will make pdbedit list the users in the database, printing out the account fields in a format compatible with the
96smbpasswd
97file format\&. (see the
98\fBsmbpasswd\fR(5)
99for details)
100.sp
101Example:
102pdbedit \-L \-w
103.sp
104.if n \{\
105.RS 4
106.\}
107.nf
108sorce:500:508818B733CE64BEAAD3B435B51404EE:
109 D2A2418EFC466A8A0F6B1DBB5C3DB80C:
110 [UX ]:LCT\-00000000:
111samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:
112 BC281CE3F53B6A5146629CD4751D3490:
113 [UX ]:LCT\-3BFA1E8D:
114.fi
115.if n \{\
116.RE
117.\}
118.RE
119.PP
120\-u username
121.RS 4
122This option specifies the username to be used for the operation requested (listing, adding, removing)\&. It is
123\fIrequired\fR
124in add, remove and modify operations and
125\fIoptional\fR
126in list operations\&.
127.RE
128.PP
129\-f fullname
130.RS 4
131This option can be used while adding or modifing a user account\&. It will specify the user\'s full name\&.
132.sp
133Example:
134\-f "Simo Sorce"
135.RE
136.PP
137\-h homedir
138.RS 4
139This option can be used while adding or modifing a user account\&. It will specify the user\'s home directory network path\&.
140.sp
141Example:
142\-h "\e\e\e\eBERSERKER\e\esorce"
143.RE
144.PP
145\-D drive
146.RS 4
147This option can be used while adding or modifing a user account\&. It will specify the windows drive letter to be used to map the home directory\&.
148.sp
149Example:
150\-D "H:"
151.RE
152.PP
153\-S script
154.RS 4
155This option can be used while adding or modifing a user account\&. It will specify the user\'s logon script path\&.
156.sp
157Example:
158\-S "\e\e\e\eBERSERKER\e\enetlogon\e\esorce\&.bat"
159.RE
160.PP
161\-p profile
162.RS 4
163This option can be used while adding or modifing a user account\&. It will specify the user\'s profile directory\&.
164.sp
165Example:
166\-p "\e\e\e\eBERSERKER\e\enetlogon"
167.RE
168.PP
169\-G SID|rid
170.RS 4
171This option can be used while adding or modifying a user account\&. It will specify the users\' new primary group SID (Security Identifier) or rid\&.
172.sp
173Example:
174\-G S\-1\-5\-21\-2447931902\-1787058256\-3961074038\-1201
175.RE
176.PP
177\-U SID|rid
178.RS 4
179This option can be used while adding or modifying a user account\&. It will specify the users\' new SID (Security Identifier) or rid\&.
180.sp
181Example:
182\-U S\-1\-5\-21\-2447931902\-1787058256\-3961074038\-5004
183.RE
184.PP
185\-c account\-control
186.RS 4
187This option can be used while adding or modifying a user account\&. It will specify the users\' account control property\&. Possible flags are listed below\&.
188.sp
189
190.sp
191.RS 4
192.ie n \{\
193\h'-04'\(bu\h'+03'\c
194.\}
195.el \{\
196.sp -1
197.IP \(bu 2.3
198.\}
199N: No password required
200.RE
201.sp
202.RS 4
203.ie n \{\
204\h'-04'\(bu\h'+03'\c
205.\}
206.el \{\
207.sp -1
208.IP \(bu 2.3
209.\}
210D: Account disabled
211.RE
212.sp
213.RS 4
214.ie n \{\
215\h'-04'\(bu\h'+03'\c
216.\}
217.el \{\
218.sp -1
219.IP \(bu 2.3
220.\}
221H: Home directory required
222.RE
223.sp
224.RS 4
225.ie n \{\
226\h'-04'\(bu\h'+03'\c
227.\}
228.el \{\
229.sp -1
230.IP \(bu 2.3
231.\}
232T: Temporary duplicate of other account
233.RE
234.sp
235.RS 4
236.ie n \{\
237\h'-04'\(bu\h'+03'\c
238.\}
239.el \{\
240.sp -1
241.IP \(bu 2.3
242.\}
243U: Regular user account
244.RE
245.sp
246.RS 4
247.ie n \{\
248\h'-04'\(bu\h'+03'\c
249.\}
250.el \{\
251.sp -1
252.IP \(bu 2.3
253.\}
254M: MNS logon user account
255.RE
256.sp
257.RS 4
258.ie n \{\
259\h'-04'\(bu\h'+03'\c
260.\}
261.el \{\
262.sp -1
263.IP \(bu 2.3
264.\}
265W: Workstation Trust Account
266.RE
267.sp
268.RS 4
269.ie n \{\
270\h'-04'\(bu\h'+03'\c
271.\}
272.el \{\
273.sp -1
274.IP \(bu 2.3
275.\}
276S: Server Trust Account
277.RE
278.sp
279.RS 4
280.ie n \{\
281\h'-04'\(bu\h'+03'\c
282.\}
283.el \{\
284.sp -1
285.IP \(bu 2.3
286.\}
287L: Automatic Locking
288.RE
289.sp
290.RS 4
291.ie n \{\
292\h'-04'\(bu\h'+03'\c
293.\}
294.el \{\
295.sp -1
296.IP \(bu 2.3
297.\}
298X: Password does not expire
299.RE
300.sp
301.RS 4
302.ie n \{\
303\h'-04'\(bu\h'+03'\c
304.\}
305.el \{\
306.sp -1
307.IP \(bu 2.3
308.\}
309I: Domain Trust Account
310.sp
311.RE
312.sp
313Example:
314\-c "[X ]"
315.RE
316.PP
317\-a
318.RS 4
319This option is used to add a user into the database\&. This command needs a user name specified with the \-u switch\&. When adding a new user, pdbedit will also ask for the password to be used\&.
320.sp
321Example:
322pdbedit \-a \-u sorce
323.sp
324.if n \{\
325.RS 4
326.\}
327.nf
328new password:
329retype new password
330.fi
331.if n \{\
332.RE
333.\}
334.sp
335.if n \{\
336.sp
337.\}
338.RS 4
339.it 1 an-trap
340.nr an-no-space-flag 1
341.nr an-break-flag 1
342.br
343.ps +1
344\fBNote\fR
345.ps -1
346.br
347pdbedit does not call the unix password syncronisation script if
348\m[blue]\fBunix password sync\fR\m[]
349has been set\&. It only updates the data in the Samba user database\&.
350.sp
351If you wish to add a user and synchronise the password that immediately, use
352smbpasswd\'s
353\fB\-a\fR
354option\&.
355.sp .5v
356.RE
357.RE
358.PP
359\-t, \-\-password\-from\-stdin
360.RS 4
361This option causes pdbedit to read the password from standard input, rather than from /dev/tty (like the
362passwd(1)
363program does)\&. The password has to be submitted twice and terminated by a newline each\&.
364.RE
365.PP
366\-r
367.RS 4
368This option is used to modify an existing user in the database\&. This command needs a user name specified with the \-u switch\&. Other options can be specified to modify the properties of the specified user\&. This flag is kept for backwards compatibility, but it is no longer necessary to specify it\&.
369.RE
370.PP
371\-m
372.RS 4
373This option may only be used in conjunction with the
374\fI\-a\fR
375option\&. It will make pdbedit to add a machine trust account instead of a user account (\-u username will provide the machine name)\&.
376.sp
377Example:
378pdbedit \-a \-m \-u w2k\-wks
379.RE
380.PP
381\-x
382.RS 4
383This option causes pdbedit to delete an account from the database\&. It needs a username specified with the \-u switch\&.
384.sp
385Example:
386pdbedit \-x \-u bob
387.RE
388.PP
389\-i passdb\-backend
390.RS 4
391Use a different passdb backend to retrieve users than the one specified in smb\&.conf\&. Can be used to import data into your local user database\&.
392.sp
393This option will ease migration from one passdb backend to another\&.
394.sp
395Example:
396pdbedit \-i smbpasswd:/etc/smbpasswd\&.old
397.RE
398.PP
399\-e passdb\-backend
400.RS 4
401Exports all currently available users to the specified password database backend\&.
402.sp
403This option will ease migration from one passdb backend to another and will ease backing up\&.
404.sp
405Example:
406pdbedit \-e smbpasswd:/root/samba\-users\&.backup
407.RE
408.PP
409\-g
410.RS 4
411If you specify
412\fI\-g\fR, then
413\fI\-i in\-backend \-e out\-backend\fR
414applies to the group mapping instead of the user database\&.
415.sp
416This option will ease migration from one passdb backend to another and will ease backing up\&.
417.RE
418.PP
419\-b passdb\-backend
420.RS 4
421Use a different default passdb backend\&.
422.sp
423Example:
424pdbedit \-b xml:/root/pdb\-backup\&.xml \-l
425.RE
426.PP
427\-P account\-policy
428.RS 4
429Display an account policy
430.sp
431Valid policies are: minimum password age, reset count minutes, disconnect time, user must logon to change password, password history, lockout duration, min password length, maximum password age and bad lockout attempt\&.
432.sp
433Example:
434pdbedit \-P "bad lockout attempt"
435.sp
436.if n \{\
437.RS 4
438.\}
439.nf
440account policy value for bad lockout attempt is 0
441.fi
442.if n \{\
443.RE
444.\}
445.RE
446.PP
447\-C account\-policy\-value
448.RS 4
449Sets an account policy to a specified value\&. This option may only be used in conjunction with the
450\fI\-P\fR
451option\&.
452.sp
453Example:
454pdbedit \-P "bad lockout attempt" \-C 3
455.sp
456.if n \{\
457.RS 4
458.\}
459.nf
460account policy value for bad lockout attempt was 0
461account policy value for bad lockout attempt is now 3
462.fi
463.if n \{\
464.RE
465.\}
466.RE
467.PP
468\-y
469.RS 4
470If you specify
471\fI\-y\fR, then
472\fI\-i in\-backend \-e out\-backend\fR
473applies to the account policies instead of the user database\&.
474.sp
475This option will allow to migrate account policies from their default tdb\-store into a passdb backend, e\&.g\&. an LDAP directory server\&.
476.sp
477Example:
478pdbedit \-y \-i tdbsam: \-e ldapsam:ldap://my\&.ldap\&.host
479.RE
480.PP
481\-h|\-\-help
482.RS 4
483Print a summary of command line options\&.
484.RE
485.PP
486\-d|\-\-debuglevel=level
487.RS 4
488\fIlevel\fR
489is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
490.sp
491The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
492.sp
493Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
494.sp
495Note that specifying this parameter here will override the
496\m[blue]\fB\%smb.conf.5.html#\fR\m[]
497parameter in the
498smb\&.conf
499file\&.
500.RE
501.PP
502\-V|\-\-version
503.RS 4
504Prints the program version number\&.
505.RE
506.PP
507\-s|\-\-configfile <configuration file>
508.RS 4
509The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
510smb\&.conf
511for more information\&. The default configuration file name is determined at compile time\&.
512.RE
513.PP
514\-l|\-\-log\-basename=logdirectory
515.RS 4
516Base directory name for log/debug files\&. The extension
517\fB"\&.progname"\fR
518will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
519.RE
520.SH "NOTES"
521.PP
522This command may be used only by root\&.
523.SH "VERSION"
524.PP
525This man page is correct for version 3 of the Samba suite\&.
526.SH "SEE ALSO"
527.PP
528\fBsmbpasswd\fR(5),
529\fBsamba\fR(7)
530.SH "AUTHOR"
531.PP
532The original Samba software and related utilities were created by Andrew Tridgell\&. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed\&.
533.PP
534The pdbedit manpage was written by Simo Sorce and Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.