We have configured samba with password protected share folders. The problem what we are facing is, multiple users were allowed to use the same system. For example if the user A uses the system S1 for the first time the system is prompting for username & password for acessing the samba shared folders and later if the user leaves the place and if user B comes in for accessing the same system say S1 it is not asking for password. Any way to fix this issue?
Note:
- I know this happens because of persistent connections. But any way to control persistent connections from samba server itself?
- Possible to make samba server to ask password on every access by disabling persistent connections??
I hope there is some possible way, but i have not got one. I have already tried the deadtime
parameter but that simply closes the idle connections and makes the resource free. i.e if the new user comes and access the samba share and then it wont prompt for username & password.
Updates:
-
Using both ubuntu and windows and samba share is running on ubuntu server 12.04.
-
On accessing samba share from ubuntu i dont face any problems. Once i unmount the share after using it, it is prompting for username and password for the second time.
-
But in windows when i access samba share for the first time, second time it is not prompting for the username and password simply the samba shared is getting accessible.
-
I just want windows machine to ask password everytime when the user closes the share, instead of doing
net use * /delete
everytime, and we cant order user to do this everytime. -
Is there a way to block this behaviour and make samba server to ask password everytime whenever they access it via windows systems ??
-
What i want to fix is, for example user A, B, & C has password credentials to access samba share, where as user D, E & F are not authorized to access samba share but all of them are authorized to use the same system say System A.
Best Answer
You are using
Windows
clients, aren't you?Well, I don't think it's a matter of persistent connections, I think it's rather a matter of cached credentials on clients. And to avoid this, you'll have to tweak your clients. Quoting directly from this page:
EDIT:
I've also found this interesting question. You could try to put a few:
into your user's autostart on the clients, so that credential are deleted whenever any user performs a login. Take also a look to this answer. It seems that it's possible to stop
Windows
caching credentials on a per-share basis in this way:But probably for your task it's sufficient something like:
or even:
Find the one that best suits your needs and try to put it into autostart (or in the registry
run
entries).