diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/daemon/common/commonInteractive.ml ./src/daemon/common/commonInteractive.ml
--- ./src/daemon/common/commonInteractive.ml	2005-04-13 23:52:25.000000000 +0200
+++ ./src/daemon/common/commonInteractive.ml	2005-04-23 18:32:17.000000000 +0200
@@ -664,6 +664,7 @@
   in
   try
     iter "" downloads_ini;
+    iter "" users_ini;
     if not (networks_iter_all_until_true (fun r ->
             try
               List.iter (fun opfile ->
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/daemon/common/commonOptions.ml ./src/daemon/common/commonOptions.ml
--- ./src/daemon/common/commonOptions.ml	2005-04-13 23:52:25.000000000 +0200
+++ ./src/daemon/common/commonOptions.ml	2005-04-23 18:32:17.000000000 +0200
@@ -124,11 +124,28 @@
     Filename.concat file_basedir "files.ini")
 let friends_ini = create_options_file (
     Filename.concat file_basedir "friends.ini")
+let users_ini = create_options_file (
+    Filename.concat file_basedir "users.ini")
 
 let messages_log = ref (Filename.concat file_basedir "messages.log")
 
 let servers_section = file_section servers_ini [] ""
+
+let users_section = file_section users_ini ["Users"] "User accounts on the core"
+
+let empty_password = Md4.string ""
   
+let users = define_option users_section ["users"]
+  "The users that are defined on this core. The default user is
+called 'admin', and uses an empty password. To create new users,
+login as admin in mldonkey, and use the 'add_user' command."
+    (list_option (tuple2_option (string_option, Md4.option)))
+    [ "admin", empty_password ]
+
+let empty_password user =
+  try
+    (List.assoc user !!users) = empty_password
+  with _ -> false
 
 let ip_list_option = list_option Ip.option
 
@@ -178,13 +195,7 @@
     (random_letter ()) (random_letter ()) (random_letter ()) 
     (random_letter ()) (random_letter ()) (random_letter ()))
 
-  
-  
-  
-  
-  
-  
-  
+
 let main_section = file_section downloads_ini ["Main"] 
   "Main options"
 let interfaces_section = file_section downloads_ini ["Interfaces" ]
@@ -885,20 +896,6 @@
 ones in allowed_commands"
     bool_option false
   
-let empty_password = Md4.string ""
-  
-let users = define_option current_section ["users"]
-  "The users that are defined on this core. The default user is
-called 'admin', and uses an empty password. To create new users,
-login as admin in mldonkey, and use the 'add_user' command."
-    (list_option (tuple2_option (string_option, Md4.option)))
-    [ "admin", empty_password ]
-
-let empty_password user =
-  try
-    (List.assoc user !!users) = empty_password
-  with _ -> false
-
 let allow_browse_share = define_option current_section ["allow_browse_share"]
   "Allow others to browse our share list (0: none, 1: friends only, 2: everyone" allow_browse_share_option 2
 
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/daemon/driver/driverInteractive.ml ./src/daemon/driver/driverInteractive.ml
--- ./src/daemon/driver/driverInteractive.ml	2005-04-23 13:43:10.000000000 +0200
+++ ./src/daemon/driver/driverInteractive.ml	2005-04-23 18:32:17.000000000 +0200
@@ -196,6 +196,7 @@
   );
   if !initialization_completed then (
       Options.save_with_help downloads_ini;
+      Options.save_with_help_private users_ini;
       CommonComplexOptions.save ();
       CommonUploads.save ();
       networks_iter_all (fun r -> 
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/daemon/driver/driverInterface.ml ./src/daemon/driver/driverInterface.ml
--- ./src/daemon/driver/driverInterface.ml	2005-04-07 18:02:50.000000000 +0200
+++ ./src/daemon/driver/driverInterface.ml	2005-04-23 18:32:17.000000000 +0200
@@ -469,6 +469,15 @@
           ) (strings_of_section_options "" s)
       ) (sections downloads_ini);
 
+(* Options panels defined in users.ini *)
+      List.iter (fun s ->
+          let section = section_name s in
+          List.iter (fun o ->
+              gui_send gui (
+                P.Add_section_option (section, o))
+          ) (strings_of_section_options "" s)
+      ) (sections users_ini);
+
 (* Options panels defined in each plugin *)
       networks_iter_all (fun r ->
           let prefix = r.network_shortname ^ "-" in
@@ -1316,6 +1325,15 @@
               with _ -> ())
       ) 
   ) downloads_ini;
+  iter_file (fun o ->
+      option_hook o (fun _ ->
+          with_guis (fun gui ->
+              try
+                let oo = strings_of_option o in
+                gui_send gui (P.Options_info [oo])
+              with _ -> ())
+      ) 
+  ) users_ini;
   networks_iter_all (fun r ->
       let prefix = r.network_shortname ^ "-"  in
       List.iter (fun opfile ->
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/daemon/driver/driverMain.ml ./src/daemon/driver/driverMain.ml
--- ./src/daemon/driver/driverMain.ml	2005-04-23 13:43:10.000000000 +0200
+++ ./src/daemon/driver/driverMain.ml	2005-04-23 18:29:54.000000000 +0200
@@ -251,10 +251,24 @@
   let exists_downloads_ini = Sys.file_exists 
       (options_file_name downloads_ini) in
   if not exists_downloads_ini then begin
-      lprintf "No config file found. Generating one.\n"; 
+      lprintf "No config file (downloads.ini) found. Generating one.\n"; 
       let oc = open_out (options_file_name downloads_ini) in
       close_out oc; 
-    end;
+      let exists_users_ini = Sys.file_exists 
+          (options_file_name users_ini) in
+      if not exists_users_ini then begin
+          lprintf "No config file (users.ini) found. Generating one.\n"; 
+          let oc = open_out (options_file_name users_ini) in
+	  close_out oc; 
+      end;
+    end
+  else
+      let exists_users_ini = Sys.file_exists 
+          (options_file_name users_ini) in
+      if not exists_users_ini then begin
+          lprintf "No config file (users.ini) found. Importing users from downloads.ini.\n"; 
+          (try Unix2.copy "downloads.ini" "users.ini" with _ -> ());
+      end;
 
 (*
   let exists_expert_ini = Sys.file_exists 
@@ -275,6 +289,7 @@
     end; *)
   (try 
       Options.load downloads_ini;
+      Options.load users_ini;
 (*      Options.load downloads_expert_ini;       *)
     with e -> 
         lprintf "Exception %s during options load\n" (Printexc2.to_string e); 
@@ -322,6 +337,8 @@
   
   more_args := !more_args
     @ (Options.simple_args "" downloads_ini);
+  more_args := !more_args
+    @ (Options.simple_args "" users_ini);
   
   networks_iter_all (fun r ->
       List.iter (fun opfile ->
@@ -511,6 +528,7 @@
       DriverInteractive.browse_friends ());
   
   Options.prune_file downloads_ini;
+  Options.prune_file users_ini;
 (*  Options.prune_file downloads_expert_ini; *)
   add_timer 20. (fun _ -> try CommonWeb.load_web_infos () with _ -> ());
   lprintf (_b "\nWelcome to MLdonkey client\n"); 
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/utils/lib/options.ml4 ./src/utils/lib/options.ml4
--- ./src/utils/lib/options.ml4	2004-11-01 12:23:02.000000000 +0100
+++ ./src/utils/lib/options.ml4	2005-04-23 18:32:17.000000000 +0200
@@ -377,6 +377,7 @@
       _ -> Printf.sprintf "\"%s\"" (escaped s)
 
 let with_help = ref false
+let save_private = ref false
 
 let tabulate s = String2.replace s '\n' "\n\t"
 
@@ -826,6 +827,7 @@
       Sys.rename old_old_file old_file;
     old_file in
   let oc = open_out temp_file in
+  if !save_private then begin try Unix.chmod temp_file 0o600 with _ -> () end;
   try
     once_values_counter := 0;
     title_opfile := true;
@@ -925,6 +927,15 @@
     _ -> ()
   end;
   with_help := false
+
+let save_with_help_private opfile =
+  with_help := true;
+  save_private := true;
+  begin try save opfile with
+    _ -> ()
+  end;
+  with_help := false;
+  save_private := false
   
 let option_hook option f = option.option_hooks <- f :: option.option_hooks
   
diff -x Root -x Repository -x Tag -x Entries -x Entries.Log -x .svn -x '*.rej' -x '*.orig' -x .cvsignore -u -N -r -E -B ./src/utils/lib/options.mli ./src/utils/lib/options.mli
--- ./src/utils/lib/options.mli	2004-08-19 09:56:55.000000000 +0200
+++ ./src/utils/lib/options.mli	2005-04-23 18:32:17.000000000 +0200
@@ -68,6 +68,7 @@
 val save : options_file -> unit
 (*d [save ()] saves all the options values to the option file. *)
 val save_with_help : options_file -> unit
+val save_with_help_private : options_file -> unit
 (*d [save_with_help ()] saves all the options values to the option file,
 with the help provided for each option. *)
 
