Windows 7 can't connect to samba share on Linux

1

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?

Devolus

Posted 2013-12-20T17:58:34.617

Reputation: 159

Have you tried Net Use – Kevin – 2013-12-20T18:02:21.757

Answers

2

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

Kevin

Posted 2013-12-20T17:58:34.617

Reputation: 1 873

That doesn't work, but at least I realised something which may be important. The machine I'm ytring to connect from is in a different domain because it's my company laptop. So how can I switch domain, resp which domainname do I have to use? I'm not aware that I configured a domain on my other machines. – Devolus – 2013-12-20T18:11:13.650

I would use the domain/workgroup of your Linux server – Kevin – 2013-12-20T18:14:04.287

for domainname in the net use command use the workgroup name from your /etc/samba/smb.conf file – Kevin – 2013-12-20T18:23:25.760

I updated my question with additional info. Adding the domain doesn't seem to help, only after a reboot it works as long as I don't connect to my company network. – Devolus – 2013-12-20T18:46:37.473

I accepted your answer because technically it would be correct, but you couldn't know about the specific circumstances and I didn't know them at the time. So your answer at least pointed me in the right direction. – Devolus – 2013-12-21T09:38:01.423

-1

I just came across the same problem with my company laptop in my company's network. I have a linux server and was trying to access a samba directory through my laptop with win7.

I tried to access the shared directory from other computers with win7 and it all worked ok, but when I tried to access it from my laptop, I got stuck with the username/password prompt.

I fixed this problem changing my network status from a "Corporate Network" to a "Domestic Network". After I did this, I was able to access the shared directory without any trouble. The strangest thing is that I changed the network back to "Corporate" and the problem was gone. I could still access the directory.

Not sure how it worked out, just did.

user314375

Posted 2013-12-20T17:58:34.617

Reputation: 1