source: branches/samba-3.2.x/docs/manpages/pdbedit.8@ 201

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

Update to Samba 3.2.3

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