1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
2 <refentry id="pdbedit">
5 <refentrytitle>pdbedit</refentrytitle>
6 <manvolnum>8</manvolnum>
11 <refname>pdbedit</refname>
12 <refpurpose>manage the SAM database</refpurpose>
17 <command>pdbedit</command>
18 <arg choice="opt">-l</arg>
19 <arg choice="opt">-v</arg>
20 <arg choice="opt">-w</arg>
21 <arg choice="opt">-u username</arg>
22 <arg choice="opt">-f fullname</arg>
23 <arg choice="opt">-h homedir</arg>
24 <arg choice="opt">-d drive</arg>
25 <arg choice="opt">-s script</arg>
26 <arg choice="opt">-p profile</arg>
27 <arg choice="opt">-a</arg>
28 <arg choice="opt">-m</arg>
29 <arg choice="opt">-x</arg>
30 <arg choice="opt">-i passdb-backend</arg>
31 <arg choice="opt">-e passdb-backend</arg>
32 <arg choice="opt">-D debuglevel</arg>
37 <title>DESCRIPTION</title>
39 <para>This tool is part of the <ulink url="samba.7.html">
40 Samba</ulink> suite.</para>
42 <para>The pdbedit program is used to manage the users accounts
43 stored in the sam database and can be run only by root.</para>
45 <para>The pdbedit tool use the passdb modular interface and is
46 independent from the kind of users database used (currently there
47 are smbpasswd, ldap, nis+ and tdb based and more can be addedd
48 without changing the tool).</para>
50 <para>There are five main ways to use pdbedit: adding a user account,
51 removing a user account, modifing a user account, listing user
52 accounts, importing users accounts.</para>
56 <title>OPTIONS</title>
60 <listitem><para>This option list all the user accounts
61 present in the users database.
62 This option prints a list of user/uid pairs separated by
63 the ':' character.</para>
65 <para>Example: <command>pdbedit -l</command></para>
66 <para><programlisting>
69 </programlisting></para>
77 <listitem><para>This option sets the verbose listing format.
78 It will make pdbedit list the users in the database printing
79 out the account fields in a descriptive format.</para>
81 <para>Example: <command>pdbedit -l -v</command></para>
82 <para><programlisting>
85 user ID/Group: 500/500
86 user RID/GRID: 2000/2001
88 Home Directory: \\BERSERKER\sorce
90 Logon Script: \\BERSERKER\netlogon\sorce.bat
91 Profile Path: \\BERSERKER\profile
95 user RID/GRID: 1090/1091
97 Home Directory: \\BERSERKER\samba
100 Profile Path: \\BERSERKER\profile
101 </programlisting></para>
109 <listitem><para>This option sets the "smbpasswd" listing format.
110 It will make pdbedit list the users in the database printing
111 out the account fields in a format compatible with the
112 <filename>smbpasswd</filename> file format. (see the <ulink
113 url="smbpasswd.5.html"><filename>smbpasswd(5)</filename></ulink> for details)</para>
115 <para>Example: <command>pdbedit -l -w</command></para>
116 <para><programlisting>
117 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX ]:LCT-00000000:
118 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX ]:LCT-3BFA1E8D:
119 </programlisting></para>
125 <term>-u username</term>
126 <listitem><para>This option specifies that the username to be
127 used for the operation requested (listing, adding, removing)
128 It is <emphasis>required</emphasis> in add, remove and modify
129 operations and <emphasis>optional</emphasis> in list
137 <term>-f fullname</term>
138 <listitem><para>This option can be used while adding or
139 modifing a user account. It will specify the user's full
142 <para>Example: <command>-f "Simo Sorce"</command></para>
149 <term>-h homedir</term>
150 <listitem><para>This option can be used while adding or
151 modifing a user account. It will specify the user's home
152 directory network path.</para>
154 <para>Example: <command>-h "\\\\BERSERKER\\sorce"</command>
162 <term>-d drive</term>
163 <listitem><para>This option can be used while adding or
164 modifing a user account. It will specify the windows drive
165 letter to be used to map the home directory.</para>
167 <para>Example: <command>-d "H:"</command>
174 <term>-s script</term>
175 <listitem><para>This option can be used while adding or
176 modifing a user account. It will specify the user's logon
179 <para>Example: <command>-s "\\\\BERSERKER\\netlogon\\sorce.bat"</command>
186 <term>-p profile</term>
187 <listitem><para>This option can be used while adding or
188 modifing a user account. It will specify the user's profile
191 <para>Example: <command>-p "\\\\BERSERKER\\netlogon"</command>
199 <listitem><para>This option is used to add a user into the
200 database. This command need the user name be specified with
201 the -u switch. When adding a new user pdbedit will also
202 ask for the password to be used</para>
204 <para>Example: <command>pdbedit -a -u sorce</command>
205 <programlisting>new password:
206 retype new password</programlisting>
215 <listitem><para>This option may only be used in conjunction
216 with the <parameter>-a</parameter> option. It will make
217 pdbedit to add a machine trust account instead of a user
218 account (-u username will provide the machine name).</para>
220 <para>Example: <command>pdbedit -a -m -u w2k-wks</command>
228 <listitem><para>This option causes pdbedit to delete an account
229 from the database. It need the username be specified with the
232 <para>Example: <command>pdbedit -x -u bob</command></para>
238 <term>-i passdb-backend</term>
239 <listitem><para>Use a different passdb backend to retrieve users than the one specified in smb.conf.</para>
241 <para>This option will ease migration from one passdb backend to another.
244 <para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old -e tdbsam:/etc/samba/passwd.tdb</command>
250 <term>-e passdb-backend</term>
251 <listitem><para>Export all currently available users to the specified password database backend.</para>
253 <para>This option will ease migration from one passdb backend to another and will ease backupping</para>
255 <para>Example: <command>pdbedit -e smbpasswd:/root/samba-users.backup</command></para>
265 <para>This command may be used only by root.</para>
270 <title>VERSION</title>
272 <para>This man page is correct for version 2.2 of
273 the Samba suite.</para>
277 <title>SEE ALSO</title>
278 <para><ulink url="smbpasswd.8.html">smbpasswd(8)</ulink>,
279 <ulink url="samba.7.html">samba(7)</ulink>
284 <title>AUTHOR</title>
286 <para>The original Samba software and related utilities
287 were created by Andrew Tridgell. Samba is now developed
288 by the Samba Team as an Open Source project similar
289 to the way the Linux kernel is developed.</para>
291 <para>The original Samba man pages were written by Karl Auer.
292 The man page sources were converted to YODL format (another
293 excellent piece of Open Source software, available at
294 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
295 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
296 release by Jeremy Allison. The conversion to DocBook for
297 Samba 2.2 was done by Gerald Carter</para>