This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / docs / manpages / pdbedit.8
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" "" ""
7 .SH NAME
8 pdbedit \- manage the SAM database
9 .SH SYNOPSIS
10
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 ]
12
13 .SH "DESCRIPTION"
14 .PP
15 This tool is part of the  Samba suite.
16 .PP
17 The pdbedit program is used to manage the users accounts
18 stored in the sam database and can only be run by root.
19 .PP
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).
24 .PP
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.
28 .SH "OPTIONS"
29 .TP
30 \fB-l\fR
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
34 the ':' character.
35
36 Example: \fBpdbedit -l\fR
37
38
39 .nf
40                 sorce:500:Simo Sorce
41                 samba:45:Test User
42                 
43 .fi
44 .TP
45 \fB-v\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.
49
50 Example: \fBpdbedit -l -v\fR
51
52
53 .nf
54                 ---------------
55                 username:       sorce
56                 user ID/Group:  500/500
57                 user RID/GRID:  2000/2001
58                 Full Name:      Simo Sorce
59                 Home Directory: \\\\BERSERKER\\sorce
60                 HomeDir Drive:  H:
61                 Logon Script:   \\\\BERSERKER\\netlogon\\sorce.bat
62                 Profile Path:   \\\\BERSERKER\\profile
63                 ---------------
64                 username:       samba
65                 user ID/Group:  45/45
66                 user RID/GRID:  1090/1091
67                 Full Name:      Test User
68                 Home Directory: \\\\BERSERKER\\samba
69                 HomeDir Drive:  
70                 Logon Script:   
71                 Profile Path:   \\\\BERSERKER\\profile
72                 
73 .fi
74 .TP
75 \fB-w\fR
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)
80
81 Example: \fBpdbedit -l -w\fR
82
83
84 .nf
85                 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX         ]:LCT-00000000:
86                 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX         ]:LCT-3BFA1E8D:
87                 
88 .fi
89 .TP
90 \fB-u username\fR
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
95 operations.
96 .TP
97 \fB-f fullname\fR
98 This option can be used while adding or
99 modifing a user account. It will specify the user's full
100 name. 
101
102 Example: \fB-f "Simo Sorce"\fR
103 .TP
104 \fB-h homedir\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.
108
109 Example: \fB-h "\\\\\\\\BERSERKER\\\\sorce"\fR
110 .TP
111 \fB-D drive\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.
115
116 Example: \fB-d "H:"\fR
117 .TP
118 \fB-S script\fR
119 This option can be used while adding or
120 modifing a user account. It will specify the user's logon
121 script path.
122
123 Example: \fB-s "\\\\\\\\BERSERKER\\\\netlogon\\\\sorce.bat"\fR
124 .TP
125 \fB-p profile\fR
126 This option can be used while adding or
127 modifing a user account. It will specify the user's profile
128 directory.
129
130 Example: \fB-p "\\\\\\\\BERSERKER\\\\netlogon"\fR
131 .TP
132 \fB-a\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.
137
138 Example: \fBpdbedit -a -u sorce\fR
139
140 .nf
141 new password:
142                 retype new password
143 .fi
144 .TP
145 \fB-m\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).
150
151 Example: \fBpdbedit -a -m -u w2k-wks\fR
152 .TP
153 \fB-x\fR
154 This option causes pdbedit to delete an account
155 from the database. It needs a username specified with the
156 -u switch.
157
158 Example: \fBpdbedit -x -u bob\fR
159 .TP
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.
164
165 This option will ease migration from one passdb backend to
166 another.
167
168 Example: \fBpdbedit -i smbpasswd:/etc/smbpasswd.old
169 \fR
170 .TP
171 \fB-e passdb-backend\fR
172 Exports all currently available users to the
173 specified password database backend.
174
175 This option will ease migration from one passdb backend to
176 another and will ease backing up.
177
178 Example: \fBpdbedit -e smbpasswd:/root/samba-users.backup\fR
179 .TP
180 \fB-b passdb-backend\fR
181 Use a different default passdb backend. 
182
183 Example: \fBpdbedit -b xml:/root/pdb-backup.xml -l\fR
184 .TP
185 \fB-P account-policy\fR
186 Display an account policy
187
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.
191
192 Example: \fBpdbedit -P "bad lockout attempt"\fR
193
194
195 .nf
196                 account policy value for bad lockout attempt is 0
197                 
198 .fi
199 .TP
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.
204
205 Example: \fBpdbedit -P "bad lockout attempt" -V 3\fR
206
207
208 .nf
209                 account policy value for bad lockout attempt was 0
210                 account policy value for bad lockout attempt is now 3
211                 
212 .fi
213 .SH "NOTES"
214 .PP
215 This command may be used only by root.
216 .SH "VERSION"
217 .PP
218 This man page is correct for version 2.2 of 
219 the Samba suite.
220 .SH "SEE ALSO"
221 .PP
222 smbpasswd(8) 
223 samba(7)
224 .SH "AUTHOR"
225 .PP
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.
230 .PP
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