source: trunk-3.0/docs/manpages/pdbedit.8@ 101

Last change on this file since 101 was 44, checked in by Paul Smedley, 18 years ago

Update source to 3.0.25b

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