1 .\" This manpage has been automatically generated by docbook2man
2 .\" from a DocBook document. This tool can be found at:
3 .\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>
4 .\" Please send any bug reports, improvements, comments, patches,
5 .\" etc. to Steve Cheng <steve@ggi-project.org>.
6 .TH "PDBEDIT" "8" "26 November 2002" "" ""
8 pdbedit \- manage the SAM database
11 \fBpdbedit\fR [ \fB-l\fR ] [ \fB-v\fR ] [ \fB-w\fR ] [ \fB-u username\fR ] [ \fB-f fullname\fR ] [ \fB-h homedir\fR ] [ \fB-D drive\fR ] [ \fB-S script\fR ] [ \fB-p profile\fR ] [ \fB-a\fR ] [ \fB-m\fR ] [ \fB-x\fR ] [ \fB-i passdb-backend\fR ] [ \fB-e passdb-backend\fR ] [ \fB-b passdb-backend\fR ] [ \fB-d debuglevel\fR ] [ \fB-s configfile\fR ] [ \fB-P account-policy\fR ] [ \fB-V value\fR ]
15 This tool is part of the Samba suite.
17 The pdbedit program is used to manage the users accounts
18 stored in the sam database and can only be run by root.
20 The pdbedit tool uses the passdb modular interface and is
21 independent from the kind of users database used (currently there
22 are smbpasswd, ldap, nis+ and tdb based and more can be added
23 without changing the tool).
25 There are five main ways to use pdbedit: adding a user account,
26 removing a user account, modifing a user account, listing user
27 accounts, importing users accounts.
31 This option lists all the user accounts
32 present in the users database.
33 This option prints a list of user/uid pairs separated by
36 Example: \fBpdbedit -l\fR
46 This option enables the verbose listing format.
47 It causes pdbedit to list the users in the database, printing
48 out the account fields in a descriptive format.
50 Example: \fBpdbedit -l -v\fR
56 user ID/Group: 500/500
57 user RID/GRID: 2000/2001
59 Home Directory: \\\\BERSERKER\\sorce
61 Logon Script: \\\\BERSERKER\\netlogon\\sorce.bat
62 Profile Path: \\\\BERSERKER\\profile
66 user RID/GRID: 1090/1091
68 Home Directory: \\\\BERSERKER\\samba
71 Profile Path: \\\\BERSERKER\\profile
76 This option sets the "smbpasswd" listing format.
77 It will make pdbedit list the users in the database, printing
78 out the account fields in a format compatible with the
79 \fIsmbpasswd\fR file format. (see the \fIsmbpasswd(5)\fR for details)
81 Example: \fBpdbedit -l -w\fR
85 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX ]:LCT-00000000:
86 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX ]:LCT-3BFA1E8D:
91 This option specifies the username to be
92 used for the operation requested (listing, adding, removing).
93 It is \fBrequired\fR in add, remove and modify
94 operations and \fBoptional\fR in list
98 This option can be used while adding or
99 modifing a user account. It will specify the user's full
102 Example: \fB-f "Simo Sorce"\fR
105 This option can be used while adding or
106 modifing a user account. It will specify the user's home
107 directory network path.
109 Example: \fB-h "\\\\\\\\BERSERKER\\\\sorce"\fR
112 This option can be used while adding or
113 modifing a user account. It will specify the windows drive
114 letter to be used to map the home directory.
116 Example: \fB-d "H:"\fR
119 This option can be used while adding or
120 modifing a user account. It will specify the user's logon
123 Example: \fB-s "\\\\\\\\BERSERKER\\\\netlogon\\\\sorce.bat"\fR
126 This option can be used while adding or
127 modifing a user account. It will specify the user's profile
130 Example: \fB-p "\\\\\\\\BERSERKER\\\\netlogon"\fR
133 This option is used to add a user into the
134 database. This command needs a user name specified with
135 the -u switch. When adding a new user, pdbedit will also
136 ask for the password to be used.
138 Example: \fBpdbedit -a -u sorce\fR
146 This option may only be used in conjunction
147 with the \fI-a\fR option. It will make
148 pdbedit to add a machine trust account instead of a user
149 account (-u username will provide the machine name).
151 Example: \fBpdbedit -a -m -u w2k-wks\fR
154 This option causes pdbedit to delete an account
155 from the database. It needs a username specified with the
158 Example: \fBpdbedit -x -u bob\fR
160 \fB-i passdb-backend\fR
161 Use a different passdb backend to retrieve users
162 than the one specified in smb.conf. Can be used to import data into
163 your local user database.
165 This option will ease migration from one passdb backend to
168 Example: \fBpdbedit -i smbpasswd:/etc/smbpasswd.old
171 \fB-e passdb-backend\fR
172 Exports all currently available users to the
173 specified password database backend.
175 This option will ease migration from one passdb backend to
176 another and will ease backing up.
178 Example: \fBpdbedit -e smbpasswd:/root/samba-users.backup\fR
180 \fB-b passdb-backend\fR
181 Use a different default passdb backend.
183 Example: \fBpdbedit -b xml:/root/pdb-backup.xml -l\fR
185 \fB-P account-policy\fR
186 Display an account policy
188 Valid policies are: minimum password age, reset count minutes, disconnect time,
189 user must logon to change password, password history, lockout duration, min password length,
190 maximum password age and bad lockout attempt.
192 Example: \fBpdbedit -P "bad lockout attempt"\fR
196 account policy value for bad lockout attempt is 0
200 \fB-V account-policy-value\fR
201 Sets an account policy to a specified value.
202 This option may only be used in conjunction
203 with the \fI-P\fR option.
205 Example: \fBpdbedit -P "bad lockout attempt" -V 3\fR
209 account policy value for bad lockout attempt was 0
210 account policy value for bad lockout attempt is now 3
215 This command may be used only by root.
218 This man page is correct for version 2.2 of
226 The original Samba software and related utilities
227 were created by Andrew Tridgell. Samba is now developed
228 by the Samba Team as an Open Source project similar
229 to the way the Linux kernel is developed.
231 The original Samba man pages were written by Karl Auer.
232 The man page sources were converted to YODL format (another
233 excellent piece of Open Source software, available at
234 ftp://ftp.icce.rug.nl/pub/unix/ <URL:ftp://ftp.icce.rug.nl/pub/unix/>) and updated for the Samba 2.0
235 release by Jeremy Allison. The conversion to DocBook for
236 Samba 2.2 was done by Gerald Carter