Windows 7 can't connect to samba share on Linux

I have three machines with Windows 7. Two of them can connect to my Linux server which is hosting a SMB share, while the third can't. I don't understand why this happens, because I connected once, and a few days later it doesn't work anymore.

When I try to go the linux machine, it asks me for a username password. On this W7 machine I intentionally left it like this, because I don't want it to store the connection. But for some reason it no longer connects. I can see the shares in the browser, but when I try to enter into it, then I can't seem to get by the password dialog. The connection definitely works, because I can connect via SSH, and on the other two machines the same shares are used as well. The only difference is that there, I have mapped the drives to a letter and it autoconnects when logging in.

So I would appreciate any tips what I should look for, because I don't really know where to start at the moment.

UPDATE

The machine in question is my company laptop. When I'm connected to my company domain this doesn't work. I also tried to enter the domain used in the smb.conf file, but that doesn't seem to help either. I get an access denied error. I tested this now and when I reboot and login to this machine, then I can connect to my linux server without any problems, I don't even need to specify the domain. As soon as I'm connecting to my company this doesn't work, and even if I logout from it, it will not work until I reboot.

So is there some policy involved that needs to be changed?


Solution 1:

See if the following works

net use x: "\\\\servername\sharename" /user:username@domainname /persistent:no

replacing all terms that end in name with the appropriate value and x with the drive letter you want

Use

net use /d x:

to disconnect