login with different names in Samba server

I setup a samba server in RHEL 6 with different users, when I browse it and login with one account, the windows seems remember the login and no more login windows prompt out again. I would like to make the samba / windows to ask each time when different users is try to login.

Who is Participating?
ThomasMcA2Connect With a Mentor Commented:
If you don't let Windows remember the login, Windows may prompt the user for the credentials at odd/inconvenient times. One workaround is to create a login script that makes the samba connections, which forces the user to re-enter their password, like this:

:: delete the current connection (just in case)
net use m: /delete

:: reconnect
net use m: "\\\share_name" /persistent:yes /user:%username%

Change the m: to the drive letter of the user's mapped drive, change the IP address to the address or name of your server, and change the share_name to the name of the share defined in smb.conf.
Gerwin Jansen, EE MVETopic Advisor Commented:
Which Windows version is this and do you see is the 'Reconnect at logon' in the map drive Window selected?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.