pwdb_initialise() in the wrong place: must load smb.conf first. thanks phil.
authorLuke Leighton <lkcl@samba.org>
Mon, 30 Nov 1998 19:29:32 +0000 (19:29 +0000)
committerLuke Leighton <lkcl@samba.org>
Mon, 30 Nov 1998 19:29:32 +0000 (19:29 +0000)
source/utils/smbpasswd.c

index 92ec9ae5a850ab5891aba6a1b2fde1d3e78d5875..a5756dd7979f3aebb935dc198ce8b30a0cef4286 100644 (file)
@@ -548,12 +548,6 @@ int main(int argc, char **argv)
        
        charset_initialise();
        
-       if(!pwdb_initialise())
-       {
-               fprintf(stderr, "Can't setup password database vectors.\n");
-               exit(1);
-       }
-
        if (!lp_load(servicesf,True,False,False)) {
                fprintf(stderr, "Can't load %s - run testparm to debug it\n", 
                        servicesf);
@@ -580,6 +574,12 @@ int main(int argc, char **argv)
 
        codepage_initialise(lp_client_code_page());
 
+       if(!pwdb_initialise())
+       {
+               fprintf(stderr, "Can't setup password database vectors.\n");
+               exit(1);
+       }
+
        /* Check the effective uid - make sure we are not setuid */
        if ((geteuid() == (uid_t)0) && (getuid() != (uid_t)0)) {
                fprintf(stderr, "smbpasswd must *NOT* be setuid root.\n");