source: branches/samba-3.5.x/docs/manpages/pdbedit.8@ 736

Last change on this file since 736 was 736, checked in by Silvan Scherrer, 13 years ago

Samba Server 3.5: update branche to 3.5.16

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: 06/30/2012
6.\" Manual: System Administration tools
7.\" Source: Samba 3.5
8.\" Language: English
9.\"
10.TH "PDBEDIT" "8" "06/30/2012" "Samba 3\&.5" "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, modifing 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 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 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 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 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 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\-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.sp
320.RE
321.sp
322Example:
323\-c "[X ]"
324.RE
325.PP
326\-K|\-\-kickoff\-time
327.RS 4
328This option is used to modify the kickoff time for a certain user\&. Use "never" as argument to set the kickoff time to unlimited\&.
329.sp
330Example:
331pdbedit \-K never user
332.RE
333.PP
334\-a|\-\-create
335.RS 4
336This 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\&.
337.sp
338Example:
339pdbedit \-a \-u sorce
340.sp
341.if n \{\
342.RS 4
343.\}
344.nf
345new password:
346retype new password
347.fi
348.if n \{\
349.RE
350.\}
351.sp
352.if n \{\
353.sp
354.\}
355.RS 4
356.it 1 an-trap
357.nr an-no-space-flag 1
358.nr an-break-flag 1
359.br
360.ps +1
361\fBNote\fR
362.ps -1
363.br
364pdbedit does not call the unix password syncronisation script if
365\m[blue]\fBunix password sync\fR\m[]
366has been set\&. It only updates the data in the Samba user database\&.
367.sp
368If you wish to add a user and synchronise the password that immediately, use
369smbpasswd\'s
370\fB\-a\fR
371option\&.
372.sp .5v
373.RE
374.RE
375.PP
376\-t|\-\-password\-from\-stdin
377.RS 4
378This option causes pdbedit to read the password from standard input, rather than from /dev/tty (like the
379passwd(1)
380program does)\&. The password has to be submitted twice and terminated by a newline each\&.
381.RE
382.PP
383\-r|\-\-modify
384.RS 4
385This 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\&.
386.RE
387.PP
388\-m|\-\-machine
389.RS 4
390This option may only be used in conjunction with the
391\fI\-a\fR
392option\&. It will make pdbedit to add a machine trust account instead of a user account (\-u username will provide the machine name)\&.
393.sp
394Example:
395pdbedit \-a \-m \-u w2k\-wks
396.RE
397.PP
398\-x|\-\-delete
399.RS 4
400This option causes pdbedit to delete an account from the database\&. It needs a username specified with the \-u switch\&.
401.sp
402Example:
403pdbedit \-x \-u bob
404.RE
405.PP
406\-i|\-\-import passdb\-backend
407.RS 4
408Use 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\&.
409.sp
410This option will ease migration from one passdb backend to another\&.
411.sp
412Example:
413pdbedit \-i smbpasswd:/etc/smbpasswd\&.old
414.RE
415.PP
416\-e|\-\-export passdb\-backend
417.RS 4
418Exports all currently available users to the specified password database backend\&.
419.sp
420This option will ease migration from one passdb backend to another and will ease backing up\&.
421.sp
422Example:
423pdbedit \-e smbpasswd:/root/samba\-users\&.backup
424.RE
425.PP
426\-g|\-\-group
427.RS 4
428If you specify
429\fI\-g\fR, then
430\fI\-i in\-backend \-e out\-backend\fR
431applies to the group mapping instead of the user database\&.
432.sp
433This option will ease migration from one passdb backend to another and will ease backing up\&.
434.RE
435.PP
436\-b|\-\-backend passdb\-backend
437.RS 4
438Use a different default passdb backend\&.
439.sp
440Example:
441pdbedit \-b xml:/root/pdb\-backup\&.xml \-l
442.RE
443.PP
444\-P|\-\-account\-policy account\-policy
445.RS 4
446Display an account policy
447.sp
448Valid 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\&.
449.sp
450Example:
451pdbedit \-P "bad lockout attempt"
452.sp
453.if n \{\
454.RS 4
455.\}
456.nf
457account policy value for bad lockout attempt is 0
458.fi
459.if n \{\
460.RE
461.\}
462.RE
463.PP
464\-C|\-\-value account\-policy\-value
465.RS 4
466Sets an account policy to a specified value\&. This option may only be used in conjunction with the
467\fI\-P\fR
468option\&.
469.sp
470Example:
471pdbedit \-P "bad lockout attempt" \-C 3
472.sp
473.if n \{\
474.RS 4
475.\}
476.nf
477account policy value for bad lockout attempt was 0
478account policy value for bad lockout attempt is now 3
479.fi
480.if n \{\
481.RE
482.\}
483.RE
484.PP
485\-y|\-\-policies
486.RS 4
487If you specify
488\fI\-y\fR, then
489\fI\-i in\-backend \-e out\-backend\fR
490applies to the account policies instead of the user database\&.
491.sp
492This option will allow to migrate account policies from their default tdb\-store into a passdb backend, e\&.g\&. an LDAP directory server\&.
493.sp
494Example:
495pdbedit \-y \-i tdbsam: \-e ldapsam:ldap://my\&.ldap\&.host
496.RE
497.PP
498\-\-force\-initialized\-passwords
499.RS 4
500This option forces all users to change their password upon next login\&.
501.RE
502.PP
503\-N|\-\-account\-desc description
504.RS 4
505This option can be used while adding or modifing a user account\&. It will specify the user\'s description field\&.
506.sp
507Example:
508\-N "test description"
509.RE
510.PP
511\-Z|\-\-logon\-hours\-reset
512.RS 4
513This option can be used while adding or modifing a user account\&. It will reset the user\'s allowed logon hours\&. A user may login at any time afterwards\&.
514.sp
515Example:
516\-Z
517.RE
518.PP
519\-z|\-\-bad\-password\-count\-reset
520.RS 4
521This option can be used while adding or modifing a user account\&. It will reset the stored bad login counter from a specified user\&.
522.sp
523Example:
524\-z
525.RE
526.PP
527\-\-policies\-reset
528.RS 4
529This option can be used to reset the general password policies stored for a domain to their default values\&.
530.sp
531Example:
532\-\-policies\-reset
533.RE
534.PP
535\-I|\-\-domain
536.RS 4
537This option can be used while adding or modifing a user account\&. It will specify the user\'s domain field\&.
538.sp
539Example:
540\-I "MYDOMAIN"
541.RE
542.PP
543\-\-time\-format
544.RS 4
545This option is currently not being used\&.
546.RE
547.PP
548\-h|\-\-help
549.RS 4
550Print a summary of command line options\&.
551.RE
552.PP
553\-d|\-\-debuglevel=level
554.RS 4
555\fIlevel\fR
556is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
557.sp
558The 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\&.
559.sp
560Levels 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\&.
561.sp
562Note that specifying this parameter here will override the
563\m[blue]\fB\%smb.conf.5.html#\fR\m[]
564parameter in the
565smb\&.conf
566file\&.
567.RE
568.PP
569\-V|\-\-version
570.RS 4
571Prints the program version number\&.
572.RE
573.PP
574\-s|\-\-configfile <configuration file>
575.RS 4
576The 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
577smb\&.conf
578for more information\&. The default configuration file name is determined at compile time\&.
579.RE
580.PP
581\-l|\-\-log\-basename=logdirectory
582.RS 4
583Base directory name for log/debug files\&. The extension
584\fB"\&.progname"\fR
585will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
586.RE
587.SH "NOTES"
588.PP
589This command may be used only by root\&.
590.SH "VERSION"
591.PP
592This man page is correct for version 3 of the Samba suite\&.
593.SH "SEE ALSO"
594.PP
595\fBsmbpasswd\fR(5),
596\fBsamba\fR(7)
597.SH "AUTHOR"
598.PP
599The 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\&.
600.PP
601The pdbedit manpage was written by Simo Sorce and Jelmer Vernooij\&.
Note: See TracBrowser for help on using the repository browser.