[Samba] "Remember Password" from 2000/XP to Samba share?

John Goggan jgoggan at dcg.com
Wed Feb 25 19:03:40 GMT 2004

I have searched for the actual answer to this repeatedly, but keep coming up
with different answers.  Most people say that it just "can't be done" but
then, once in a while, someone seems to reply that they are doing it and it
works fine.  Which messes up that whole "it can't be done" argument.  :)

Basically, we have a network with a Windows 2000 Small Business server, a
Linux box running Samba v2.2.3a (which I did not configure and do not have
direct administrative access to) -- and then various client machines ranging
from Win9x to 2000 to XP.

For the Windows 2000/XP machines, if the user/password used on that machine is
identical to the samba share user/pass, then it auto-logins and works fine. 
But, if the passwords do not match (they are still using the same usernames --
just different passwords on the Windows box and samba box), then there does
not appear to be a way to get them to automatically reconnect to the samba
share.  It works when they connect, but the "remember password" option on the
mapping appears to be ignored.  If they log out of the Windows box and then
log back in, it asks for the samba share password again when it tries to remap

Some people say that "that's just the way it is with 2000/XP" -- that it
simply won't remember the password to a samba share and, to make it work, you
have to make sure that that match.  But, I've found a couple people that swear
that it remembers fine for them -- and that they haven't done anything special
to either side.

As I said, I didn't configure the samba box, so I'm not sure if something
might be wrong there.  I do have access to the config file though, so here are
what I believe may be the relevant bits from the smb.conf file:

workgroup = ourdomain.local
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
unix password sync = Yes
pam password change = yes

When all is said and done, what we'd like is one (or both) of the following:

1. The ability to have the same username on both the Windows box and Samba
box, but with different passwords -- and have the samba share automatically
remapped when the user logs into the Windows box without having to re-type the
password each time (i.e. log into the Windows box, connect to the share with
the username and different password, create a drive mapping and choose the
"remember password" option, and have it "just work" next time the user logs
back into the Windows box using their Windows/domain password.  (Note that I
could do that know with a batch file that does "net use" and has the samba
password in it in plaintext, but that doesn't seem like the "right" solution
to me.)

2. Have the passwords always match by automating the changing of the password
on the Samba box for the user when they change their Windows/domain password

Thanks much for any guidance here!

 - John...

More information about the samba mailing list