Hi!

The two attached patches add some more updated documentation to the 
smb.conf and pdbedit manpages. They also add better verbosity for
pdbedit.

Jelmer

-- 
Jelmer Vernooij <[EMAIL PROTECTED]> - http://nl.linux.org/~jelmer/
Development And Underdevelopment: http://library.thinkquest.org/C0110231/
 11:43:56 up 24 days, 12:37, 11 users,  load average: 0.75, 0.60, 0.64
Index: docs/docbook/manpages/smb.conf.5.sgml
===================================================================
RCS file: /cvsroot/samba/docs/docbook/manpages/smb.conf.5.sgml,v
retrieving revision 1.24
diff -u -3 -p -r1.24 smb.conf.5.sgml
--- docs/docbook/manpages/smb.conf.5.sgml       1 Apr 2002 15:19:03 -0000       1.24
+++ docs/docbook/manpages/smb.conf.5.sgml       13 Apr 2002 09:00:08 -0000
@@ -5064,10 +5064,10 @@
 
                <varlistentry>
                <term><anchor id="PASSDBBACKEND">passdb backend (G)</term>
-               <listitem><para>This option allows the administrator to chose what
-                backend in which to store passwords.  This allows (for example) both 
-                smbpasswd and tdbsam to be used without a recompile.  Only one can
-                be used at a time however, and experimental backends must still be 
selected
+               <listitem><para>This option allows the administrator to chose which 
+backends to retrieve and store passwords with. This allows (for example) both 
+                smbpasswd and tdbsam to be used without a recompile. 
+                Multiple backends can be specified, seperated by spaces. The backends 
+will be searched in the order they are specified. New users are always added to the 
+first backend specified.
+                Experimental backends must still be selected
                 (eg --with-tdbsam) at configure time.
                </para>
 
@@ -5120,9 +5120,9 @@
                </para>
 
                <para>Default: <command>passdb backend = smbpasswd</command></para>
-               <para>Example: <command>passdb backend = 
tdbsam:/etc/samba/private/passdb.tdb</command></para>
+               <para>Example: <command>passdb backend = 
+tdbsam:/etc/samba/private/passdb.tdb smbpasswd:/etc/samba/smbpasswd</command></para>
                <para>Example: <command>passdb backend = 
ldapsam_nua:ldaps://ldap.example.com</command></para>
-               <para>Example: <command>passdb backend = 
plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args</command></para>
+               <para>Example: <command>passdb backend = 
+plugin:/usr/local/samba/lib/my_passdb.so:my_plugin_args 
+tdbsam:/etc/samba/private/passdb.tdb</command></para>
                </listitem>
                </varlistentry>
 
Index: source/utils/pdbedit.c
===================================================================
RCS file: /cvsroot/samba/source/utils/pdbedit.c,v
retrieving revision 1.39
diff -u -3 -p -r1.39 pdbedit.c
--- source/utils/pdbedit.c      19 Mar 2002 13:57:53 -0000      1.39
+++ source/utils/pdbedit.c      13 Apr 2002 09:00:14 -0000
@@ -69,24 +70,42 @@ static int print_sam_info (SAM_ACCOUNT *
 {
        uid_t uid;
        gid_t gid;
+       time_t tmp;
 
        /* TODO: chaeck if entry is a user or a workstation */
        if (!sam_pwent) return -1;
        
        if (verbosity) {
-               printf ("username:       %s\n",  pdb_get_username(sam_pwent));
+               printf ("Unix/NT username:     %s/%s\n",  
+pdb_get_username(sam_pwent),pdb_get_nt_username(sam_pwent));
                if (IS_SAM_UNIX_USER(sam_pwent)) {
                        uid = pdb_get_uid(sam_pwent);
                        gid = pdb_get_gid(sam_pwent);
-                       printf ("user ID/Group:  %d/%d\n", uid, gid);
+                       printf ("user ID/Group:        %d/%d\n", uid, gid);
                }
-               printf ("user RID/GRID:  %u/%u\n", (unsigned 
int)pdb_get_user_rid(sam_pwent),
+               printf ("user RID/GRID:        %u/%u\n", (unsigned 
+int)pdb_get_user_rid(sam_pwent),
                        (unsigned int)pdb_get_group_rid(sam_pwent));
-               printf ("Full Name:      %s\n", pdb_get_fullname(sam_pwent));
-               printf ("Home Directory: %s\n", pdb_get_homedir(sam_pwent));
-               printf ("HomeDir Drive:  %s\n", pdb_get_dirdrive(sam_pwent));
-               printf ("Logon Script:   %s\n", pdb_get_logon_script(sam_pwent));
-               printf ("Profile Path:   %s\n", pdb_get_profile_path(sam_pwent));
+               printf ("Full Name:            %s\n", pdb_get_fullname(sam_pwent));
+               printf ("Home Directory:       %s\n", pdb_get_homedir(sam_pwent));
+               printf ("HomeDir Drive:        %s\n", pdb_get_dirdrive(sam_pwent));
+               printf ("Logon Script:         %s\n", pdb_get_logon_script(sam_pwent));
+               printf ("Profile Path:         %s\n", pdb_get_profile_path(sam_pwent));
+        printf ("Domain:               %s\n", pdb_get_domain(sam_pwent));
+        printf ("Account desc:         %s\n", pdb_get_acct_desc(sam_pwent));
+        printf ("Workstations:         %s\n", pdb_get_workstations(sam_pwent));
+        printf ("Munged dial:          %s\n", pdb_get_munged_dial(sam_pwent));
+               tmp = pdb_get_logon_time(sam_pwent);
+        if(tmp)printf ("Logon time:           %s", ctime(&tmp));
+               tmp = pdb_get_logoff_time(sam_pwent);
+        if(tmp)printf ("Logoff time:          %s", ctime(&tmp));
+               tmp = pdb_get_kickoff_time(sam_pwent);
+        if(tmp)printf ("Kickoff time:         %s", ctime(&tmp));
+               tmp = pdb_get_pass_last_set_time(sam_pwent);
+        if(tmp)printf ("Password last set:    %s", ctime(&tmp));
+               tmp = pdb_get_pass_can_change_time(sam_pwent);
+        if(tmp)printf ("Password can change:  %s", ctime(&tmp));
+               tmp = pdb_get_pass_must_change_time(sam_pwent);
+        if(tmp)printf ("Password must change: %s", ctime(&tmp));
+
        } else if (smbpwdstyle) {
                if (IS_SAM_UNIX_USER(sam_pwent)) {
                        char lm_passwd[33];

? jelmer.diff
Index: docs/docbook/manpages/pdbedit.8.sgml
===================================================================
RCS file: /cvsroot/samba/docs/docbook/manpages/pdbedit.8.sgml,v
retrieving revision 1.3
diff -u -3 -p -r1.3 pdbedit.8.sgml
--- docs/docbook/manpages/pdbedit.8.sgml        8 Jan 2002 22:53:58 -0000       1.3
+++ docs/docbook/manpages/pdbedit.8.sgml        13 Apr 2002 09:44:06 -0000
@@ -27,7 +27,9 @@
                <arg choice="opt">-a</arg>      
                <arg choice="opt">-m</arg>      
                <arg choice="opt">-x</arg>      
-               <arg choice="opt">-i file</arg> 
+               <arg choice="opt">-i passdb-backend</arg>       
+               <arg choice="opt">-e passdb-backend</arg>   
+               <arg choice="opt">-D debuglevel</arg>
        </cmdsynopsis>
 </refsynopsisdiv>
 
@@ -233,16 +235,24 @@
                
 
                <varlistentry>
-               <term>-i file</term>
-               <listitem><para>This command is used to import a smbpasswd
-               file into the database.</para>
-
-               <para>This option will ease migration from the plain smbpasswd
-               file database to more powerful backend databases like tdb and
-               ldap.</para>
+               <term>-i passdb-backend</term>
+               <listitem><para>Use a different passdb backend to retrieve users than 
+the one specified in smb.conf.</para>
 
-               <para>Example: <command>pdbedit -i /etc/smbpasswd.old</command>
+               <para>This option will ease migration from one passdb backend to 
+another.
                </para>
+
+               <para>Example: <command>pdbedit -i smbpasswd:/etc/smbpasswd.old -e 
+tdbsam:/etc/samba/passwd.tdb</command>
+               </para>
+               </listitem>
+               </varlistentry>
+
+               <varlistentry>
+               <term>-e passdb-backend</term>
+               <listitem><para>Export all currently available users to the specified 
+password database backend.</para>
+
+               <para>This option will ease migration from one passdb backend to 
+another and will ease backupping</para>
+               
+               <para>Example: <command>pdbedit -e 
+smbpasswd:/root/samba-users.backup</command></para>
                </listitem>
                </varlistentry>
        </variablelist>

Reply via email to