smbmounted shares don't stay mounted

Urban Widmark urban at svenskatest.se
Wed Dec 2 10:13:44 GMT 1998


On Wed, 2 Dec 1998, Tom Holroyd wrote:

> I'm running Linux 2.1.130 on an AXP, with Samba 2.0 beta 2.  I have smbfs
> enabled in the kernel with Win 95 bug fixes enabled but I'm not running
> smbd.  The server containing the share is an HP running Samba 1.9.16p11. 
> I mount the share with
> 	smbmount //hpname/share -c 'mount /home/me/mydir'
> 

If you don't include the password on the smbmount line it will ask again
when the connection timeout. So you should do:
% smbmount //hpname/share password -c 'mount /home/me/mydir'

This will make smbmount reconnect without asking. As far as I can tell the
retry messages are normal. I ran into this myself some weeks ago ...


It would be simple for the client to remember the password typed at the
password prompt. Someting like:

--- samba-2.0.0beta2/source/client/clientutil.c.org     Wed Dec  2 11:02:40 1998
+++ samba-2.0.0beta2/source/client/clientutil.c Wed Dec  2 11:04:18 1998
@@ -605,8 +605,13 @@
 
   if (got_pass)
     pass = password;
-  else
+  else {
     pass = (char *)getpass("Password: ");
+
+    /* Remember for next time */
+    got_pass = True;
+    password = strdup(pass);
+  }
 
   if(!pass)
     pass = "";

But I'm not sure if there is a reason for not remembering. Michael?
The code above is completely untested, and I'm not sure if the strdup is
necessary.

/Urban

---
Urban Widmark                           urban at svenskatest.se
Svenska Test AB                         +46 90 71 71 23




More information about the samba mailing list