source: vendor/current/docs/manpages/pdbedit.8@ 746

Last change on this file since 746 was 746, checked in by Silvan Scherrer, 12 years ago

Samba Server: updated vendor to 3.6.9

File size: 14.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: 10/29/2012
6.\" Manual: System Administration tools
7.\" Source: Samba 3.6
8.\" Language: English
9.\"
10.TH "PDBEDIT" "8" "10/29/2012" "Samba 3\&.6" "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 [\-a] [\-b\ passdb\-backend] [\-c\ account\-control] [\-C\ value] [\-d\ debuglevel] [\-D\ drive] [\-e\ passdb\-backend] [\-f\ fullname] [\-\-force\-initialized\-passwords] [\-g] [\-h\ homedir] [\-i\ passdb\-backend] [\-I\ domain] [\-K] [\-L] [\-m] [\-M\ SID|RID] [\-N\ description] [\-P\ account\-policy] [\-p\ profile] [\-\-policies\-reset] [\-r] [\-s\ configfile] [\-S\ script] [\-t] [\-\-time\-format] [\-u\ username] [\-U\ SID|RID] [\-v] [\-V] [\-w] [\-x] [\-y] [\-z] [\-Z]
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, modifying a user account, listing user accounts, importing users accounts\&.
37.SH "OPTIONS"
38.PP
39\-L|\-\-list
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|\-\-verbose
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|\-\-smbpasswd\-style
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|\-\-user 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 fullname
130.RS 4
131This option can be used while adding or modifying 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 homedir
138.RS 4
139This option can be used while adding or modifying 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 drive
146.RS 4
147This option can be used while adding or modifying 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 script
154.RS 4
155This option can be used while adding or modifying 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 profile
162.RS 4
163This option can be used while adding or modifying 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\-M|\'\-\-machine SID\' SID|rid
170.RS 4
171This option can be used while adding or modifying a machine account\&. It will specify the machines\' new primary group SID (Security Identifier) or rid\&.
172.sp
173Example:
174\-M S\-1\-5\-21\-2447931902\-1787058256\-3961074038\-1201
175.RE
176.PP
177\-U|\'\-\-user SID\' 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.sp
184Example:
185\'\-\-user SID\' S\-1\-5\-21\-2447931902\-1787058256\-3961074038\-5004
186.sp
187Example:
188\-U 5004
189.sp
190Example:
191\'\-\-user SID\' 5004
192.RE
193.PP
194\-c|\-\-account\-control account\-control
195.RS 4
196This option can be used while adding or modifying a user account\&. It will specify the users\' account control property\&. Possible flags are listed below\&.
197.sp
198
199.sp
200.RS 4
201.ie n \{\
202\h'-04'\(bu\h'+03'\c
203.\}
204.el \{\
205.sp -1
206.IP \(bu 2.3
207.\}
208N: No password required
209.RE
210.sp
211.RS 4
212.ie n \{\
213\h'-04'\(bu\h'+03'\c
214.\}
215.el \{\
216.sp -1
217.IP \(bu 2.3
218.\}
219D: Account disabled
220.RE
221.sp
222.RS 4
223.ie n \{\
224\h'-04'\(bu\h'+03'\c
225.\}
226.el \{\
227.sp -1
228.IP \(bu 2.3
229.\}
230H: Home directory required
231.RE
232.sp
233.RS 4
234.ie n \{\
235\h'-04'\(bu\h'+03'\c
236.\}
237.el \{\
238.sp -1
239.IP \(bu 2.3
240.\}
241T: Temporary duplicate of other account
242.RE
243.sp
244.RS 4
245.ie n \{\
246\h'-04'\(bu\h'+03'\c
247.\}
248.el \{\
249.sp -1
250.IP \(bu 2.3
251.\}
252U: Regular user account
253.RE
254.sp
255.RS 4
256.ie n \{\
257\h'-04'\(bu\h'+03'\c
258.\}
259.el \{\
260.sp -1
261.IP \(bu 2.3
262.\}
263M: MNS logon user account
264.RE
265.sp
266.RS 4
267.ie n \{\
268\h'-04'\(bu\h'+03'\c
269.\}
270.el \{\
271.sp -1
272.IP \(bu 2.3
273.\}
274W: Workstation Trust Account
275.RE
276.sp
277.RS 4
278.ie n \{\
279\h'-04'\(bu\h'+03'\c
280.\}
281.el \{\
282.sp -1
283.IP \(bu 2.3
284.\}
285S: Server Trust Account
286.RE
287.sp
288.RS 4
289.ie n \{\
290\h'-04'\(bu\h'+03'\c
291.\}
292.el \{\
293.sp -1
294.IP \(bu 2.3
295.\}
296L: Automatic Locking
297.RE
298.sp
299.RS 4
300.ie n \{\
301\h'-04'\(bu\h'+03'\c
302.\}
303.el \{\
304.sp -1
305.IP \(bu 2.3
306.\}
307X: Password does not expire
308.RE
309.sp
310.RS 4
311.ie n \{\
312\h'-04'\(bu\h'+03'\c
313.\}
314.el \{\
315.sp -1
316.IP \(bu 2.3
317.\}
318I: Domain Trust Account
319.RE
320.sp
321.RE
322.sp
323Example:
324\-c "[X ]"
325.RE
326.PP
327\-K|\-\-kickoff\-time
328.RS 4
329This option is used to modify the kickoff time for a certain user\&. Use "never" as argument to set the kickoff time to unlimited\&.
330.sp
331Example:
332pdbedit \-K never user
333.RE
334.PP
335\-a|\-\-create
336.RS 4
337This 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\&.
338.sp
339Example:
340pdbedit \-a \-u sorce
341.sp
342.if n \{\
343.RS 4
344.\}
345.nf
346new password:
347retype new password
348.fi
349.if n \{\
350.RE
351.\}
352.sp
353.if n \{\
354.sp
355.\}
356.RS 4
357.it 1 an-trap
358.nr an-no-space-flag 1
359.nr an-break-flag 1
360.br
361.ps +1
362\fBNote\fR
363.ps -1
364.br
365pdbedit does not call the unix password syncronisation script if
366\m[blue]\fBunix password sync\fR\m[]
367has been set\&. It only updates the data in the Samba user database\&.
368.sp
369If you wish to add a user and synchronise the password that immediately, use
370smbpasswd\'s
371\fB\-a\fR
372option\&.
373.sp .5v
374.RE
375.RE
376.PP
377\-t|\-\-password\-from\-stdin
378.RS 4
379This option causes pdbedit to read the password from standard input, rather than from /dev/tty (like the
380passwd(1)
381program does)\&. The password has to be submitted twice and terminated by a newline each\&.
382.RE
383.PP
384\-r|\-\-modify
385.RS 4
386This 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\&.
387.RE
388.PP
389\-m|\-\-machine
390.RS 4
391This option may only be used in conjunction with the
392\fI\-a\fR
393option\&. It will make pdbedit to add a machine trust account instead of a user account (\-u username will provide the machine name)\&.
394.sp
395Example:
396pdbedit \-a \-m \-u w2k\-wks
397.RE
398.PP
399\-x|\-\-delete
400.RS 4
401This option causes pdbedit to delete an account from the database\&. It needs a username specified with the \-u switch\&.
402.sp
403Example:
404pdbedit \-x \-u bob
405.RE
406.PP
407\-i|\-\-import passdb\-backend
408.RS 4
409Use 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\&.
410.sp
411This option will ease migration from one passdb backend to another\&.
412.sp
413Example:
414pdbedit \-i smbpasswd:/etc/smbpasswd\&.old
415.RE
416.PP
417\-e|\-\-export passdb\-backend
418.RS 4
419Exports all currently available users to the specified password database backend\&.
420.sp
421This option will ease migration from one passdb backend to another and will ease backing up\&.
422.sp
423Example:
424pdbedit \-e smbpasswd:/root/samba\-users\&.backup
425.RE
426.PP
427\-g|\-\-group
428.RS 4
429If you specify
430\fI\-g\fR, then
431\fI\-i in\-backend \-e out\-backend\fR
432applies to the group mapping instead of the user database\&.
433.sp
434This option will ease migration from one passdb backend to another and will ease backing up\&.
435.RE
436.PP
437\-b|\-\-backend passdb\-backend
438.RS 4
439Use a different default passdb backend\&.
440.sp
441Example:
442pdbedit \-b xml:/root/pdb\-backup\&.xml \-l
443.RE
444.PP
445\-P|\-\-account\-policy account\-policy
446.RS 4
447Display an account policy
448.sp
449Valid 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\&.
450.sp
451Example:
452pdbedit \-P "bad lockout attempt"
453.sp
454.if n \{\
455.RS 4
456.\}
457.nf
458account policy value for bad lockout attempt is 0
459.fi
460.if n \{\
461.RE
462.\}
463.RE
464.PP
465\-C|\-\-value account\-policy\-value
466.RS 4
467Sets an account policy to a specified value\&. This option may only be used in conjunction with the
468\fI\-P\fR
469option\&.
470.sp
471Example:
472pdbedit \-P "bad lockout attempt" \-C 3
473.sp
474.if n \{\
475.RS 4
476.\}
477.nf
478account policy value for bad lockout attempt was 0
479account policy value for bad lockout attempt is now 3
480.fi
481.if n \{\
482.RE
483.\}
484.RE
485.PP
486\-y|\-\-policies
487.RS 4
488If you specify
489\fI\-y\fR, then
490\fI\-i in\-backend \-e out\-backend\fR
491applies to the account policies instead of the user database\&.
492.sp
493This option will allow to migrate account policies from their default tdb\-store into a passdb backend, e\&.g\&. an LDAP directory server\&.
494.sp
495Example:
496pdbedit \-y \-i tdbsam: \-e ldapsam:ldap://my\&.ldap\&.host
497.RE
498.PP
499\-\-force\-initialized\-passwords
500.RS 4
501This option forces all users to change their password upon next login\&.
502.RE
503.PP
504\-N|\-\-account\-desc description
505.RS 4
506This option can be used while adding or modifying a user account\&. It will specify the user\'s description field\&.
507.sp
508Example:
509\-N "test description"
510.RE
511.PP
512\-Z|\-\-logon\-hours\-reset
513.RS 4
514This option can be used while adding or modifying a user account\&. It will reset the user\'s allowed logon hours\&. A user may login at any time afterwards\&.
515.sp
516Example:
517\-Z
518.RE
519.PP
520\-z|\-\-bad\-password\-count\-reset
521.RS 4
522This option can be used while adding or modifying a user account\&. It will reset the stored bad login counter from a specified user\&.
523.sp
524Example:
525\-z
526.RE
527.PP
528\-\-policies\-reset
529.RS 4
530This option can be used to reset the general password policies stored for a domain to their default values\&.
531.sp
532Example:
533\-\-policies\-reset
534.RE
535.PP
536\-I|\-\-domain
537.RS 4
538This option can be used while adding or modifying a user account\&. It will specify the user\'s domain field\&.
539.sp
540Example:
541\-I "MYDOMAIN"
542.RE
543.PP
544\-\-time\-format
545.RS 4
546This option is currently not being used\&.
547.RE
548.PP
549\-h|\-\-help
550.RS 4
551Print a summary of command line options\&.
552.RE
553.PP
554\-d|\-\-debuglevel=level
555.RS 4
556\fIlevel\fR
557is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
558.sp
559The 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\&.
560.sp
561Levels 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\&.
562.sp
563Note that specifying this parameter here will override the
564\m[blue]\fB\%smb.conf.5.html#\fR\m[]
565parameter in the
566smb\&.conf
567file\&.
568.RE
569.PP
570\-V|\-\-version
571.RS 4
572Prints the program version number\&.
573.RE
574.PP
575\-s|\-\-configfile <configuration file>
576.RS 4
577The 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
578smb\&.conf
579for more information\&. The default configuration file name is determined at compile time\&.
580.RE
581.PP
582\-l|\-\-log\-basename=logdirectory
583.RS 4
584Base directory name for log/debug files\&. The extension
585\fB"\&.progname"\fR
586will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
587.RE
588.SH "NOTES"
589.PP
590This command may be used only by root\&.
591.SH "VERSION"
592.PP
593This man page is correct for version 3 of the Samba suite\&.
594.SH "SEE ALSO"
595.PP
596\fBsmbpasswd\fR(5),
597\fBsamba\fR(7)
598.SH "AUTHOR"
599.PP
600The 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\&.
601.PP
602The pdbedit manpage was written by Simo Sorce and Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.