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">-b passdb-backend</arg>
33 <arg choice="opt">-D debuglevel</arg>
38 <title>DESCRIPTION</title>
40 <para>This tool is part of the <ulink url="samba.7.html">
41 Samba</ulink> suite.</para>
43 <para>The pdbedit program is used to manage the users accounts
44 stored in the sam database and can be run only by root.</para>
46 <para>The pdbedit tool use the passdb modular interface and is
47 independent from the kind of users database used (currently there
48 are smbpasswd, ldap, nis+ and tdb based and more can be addedd
49 without changing the tool).</para>
51 <para>There are five main ways to use pdbedit: adding a user account,
52 removing a user account, modifing a user account, listing user
53 accounts, importing users accounts.</para>
57 <title>OPTIONS</title>
61 <listitem><para>This option list all the user accounts
62 present in the users database.
63 This option prints a list of user/uid pairs separated by
64 the ':' character.</para>
66 <para>Example: <command>pdbedit -l</command></para>
67 <para><programlisting>
70 </programlisting></para>
78 <listitem><para>This option sets the verbose listing format.
79 It will make pdbedit list the users in the database printing
80 out the account fields in a descriptive format.</para>
82 <para>Example: <command>pdbedit -l -v</command></para>
83 <para><programlisting>
86 user ID/Group: 500/500
87 user RID/GRID: 2000/2001
89 Home Directory: \\BERSERKER\sorce
91 Logon Script: \\BERSERKER\netlogon\sorce.bat
92 Profile Path: \\BERSERKER\profile
96 user RID/GRID: 1090/1091
98 Home Directory: \\BERSERKER\samba
101 Profile Path: \\BERSERKER\profile
102 </programlisting></para>
110 <listitem><para>This option sets the "smbpasswd" listing format.
111 It will make pdbedit list the users in the database printing
112 out the account fields in a format compatible with the
113 <filename>smbpasswd</filename> file format. (see the <ulink
114 url="smbpasswd.5.html"><filename>smbpasswd(5)</filename></ulink> for details)</para>
116 <para>Example: <command>pdbedit -l -w</command></para>
117 <para><programlisting>
118 sorce:500:508818B733CE64BEAAD3B435B51404EE:D2A2418EFC466A8A0F6B1DBB5C3DB80C:[UX ]:LCT-00000000:
119 samba:45:0F2B255F7B67A7A9AAD3B435B51404EE:BC281CE3F53B6A5146629CD4751D3490:[UX ]:LCT-3BFA1E8D:
120 </programlisting></para>
126 <term>-u username</term>
127 <listitem><para>This option specifies that the username to be
128 used for the operation requested (listing, adding, removing)
129 It is <emphasis>required</emphasis> in add, remove and modify
130 operations and <emphasis>optional</emphasis> in list
138 <term>-f fullname</term>
139 <listitem><para>This option can be used while adding or
140 modifing a user account. It will specify the user's full
143 <para>Example: <command>-f "Simo Sorce"</command></para>
150 <term>-h homedir</term>
151 <listitem><para>This option can be used while adding or
152 modifing a user account. It will specify the user's home
153 directory network path.</para>
155 <para>Example: <command>-h "\\\\BERSERKER\\sorce"</command>
163 <term>-d drive</term>
164 <listitem><para>This option can be used while adding or
165 modifing a user account. It will specify the windows drive
166 letter to be used to map the home directory.</para>
168 <para>Example: <command>-d "H:"</command>
175 <term>-s script</term>
176 <listitem><para>This option can be used while adding or
177 modifing a user account. It will specify the user's logon
180 <para>Example: <command>-s "\\\\BERSERKER\\netlogon\\sorce.bat"</command>
187 <term>-p profile</term>
188 <listitem><para>This option can be used while adding or
189 modifing a user account. It will specify the user's profile
192 <para>Example: <command>-p "\\\\BERSERKER\\netlogon"</command>
200 <listitem><para>This option is used to add a user into the
201 database. This command need the user name be specified with
202 the -u switch. When adding a new user pdbedit will also
203 ask for the password to be used</para>
205 <para>Example: <command>pdbedit -a -u sorce</command>
206 <programlisting>new password:
207 retype new password</programlisting>
216 <listitem><para>This option may only be used in conjunction
217 with the <parameter>-a</parameter> option. It will make
218 pdbedit to add a machine trust account instead of a user
219 account (-u username will provide the machine name).</para>
221 <para>Example: <command>pdbedit -a -m -u w2k-wks</command>
229 <listitem><para>This option causes pdbedit to delete an account
230 from the database. It need the username be specified with the
233 <para>Example: <command>pdbedit -x -u bob</command></para>
239 <term>-i passdb-backend</term>
240 <listitem><para>Use a different passdb backend to retrieve users than the one specified in smb.conf. Can be used to import data into your
241 local user database.</para>
243 <para>This option will ease migration from one passdb backend to another.
246 <para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old</command>
252 <term>-e passdb-backend</term>
253 <listitem><para>Export all currently available users to the specified password database backend.</para>
255 <para>This option will ease migration from one passdb backend to another and will ease backupping</para>
257 <para>Example: <command>pdbedit -e smbpasswd:/root/samba-users.backup</command></para>
262 <term>-b passdb-backend</term>
263 <listitem><para>Use a different default passdb backend. </para>
265 <para>Example: <command>pdbedit -b xml:/root/pdb-backup.xml -l</command></para>
275 <para>This command may be used only by root.</para>
280 <title>VERSION</title>
282 <para>This man page is correct for version 2.2 of
283 the Samba suite.</para>
287 <title>SEE ALSO</title>
288 <para><ulink url="smbpasswd.8.html">smbpasswd(8)</ulink>,
289 <ulink url="samba.7.html">samba(7)</ulink>
294 <title>AUTHOR</title>
296 <para>The original Samba software and related utilities
297 were created by Andrew Tridgell. Samba is now developed
298 by the Samba Team as an Open Source project similar
299 to the way the Linux kernel is developed.</para>
301 <para>The original Samba man pages were written by Karl Auer.
302 The man page sources were converted to YODL format (another
303 excellent piece of Open Source software, available at
304 <ulink url="ftp://ftp.icce.rug.nl/pub/unix/">
305 ftp://ftp.icce.rug.nl/pub/unix/</ulink>) and updated for the Samba 2.0
306 release by Jeremy Allison. The conversion to DocBook for
307 Samba 2.2 was done by Gerald Carter</para>