0

I want to share a folder in Ubuntu 16.04 to windows 7. I followed the guide at below link but no luck.

Ubuntu 14.04 lts <-> Windows 7 sharing

My problem:

  1. Windows 7 cannot discover the shared folder by its own, but when I type "\ubuntu hostname\", I can see there is a shared folder from ubuntu, looks good.

  2. But when I click the shared folder in windows 7 to login with Ubuntu login, it failed.

Login: ubuntu hostname\account name Password: my ubuntu account password

When I check the log file "log.bmdb", there is an error "Failed to register/refresh name WORKG<1d> on subnet"

"WORKG" is the workgroup name of my window 7 server.

I'm getting lost what caused this problem. Is it a DNS server issue? Do we actually needed to configure a DNS server on ubuntu in order to use SAMBA?

Thanks!

1 Answers1

0

You have two issues so I will address the second one first:

But when I click the shared folder in windows 7 to login with Ubuntu login, it failed.

Login: ubuntu hostname\account name Password: my ubuntu account password

There is a step missing from your link. A step that was not necessary in Ubuntu 14.04 but is in Ubuntu 16.04. There are two passwords for a given user - the local login password for that user and the samba password for that user. You need to add your user name to the samba password database:

sudo smbpasswd -a your-user-name

The passwords can be the same but it has to be defined in samba.

Windows 7 cannot discover the shared folder by its own, but when I type "\ubuntu hostname\", I can see there is a shared folder from ubuntu, looks good.

This one is perplexing. It's not a normal name resolution problem since you can access the machine by name.

Did you by any chance disable SMB 1.0/CIFS File Sharing Support on your Win7 box? No SMB1 on the client end of SMB means no netbios name "discovery" on that box. It doesn't affect name resolution since the server can still be accessed by name but it does affect hostname "browsing" and fits your symptom.

Morbius1
  • 7,761
  • problem fixed, it is exactly as you described. Thank you very much! I searched on the internet for days and didn't know that there are 2 passwords :). Regarding the auto discovery issue, it should be my firewall blocked port 137 which is used by netbios – user8100646 Jun 14 '18 at 14:16