map ubuntu shared folder in windows 7

I have a virtual machine running ubuntu and I am trying to host some files on ubuntu and map the drive in windows PC.

Following the steps here, I am able to see (from windows) the "work" folder after typing in \ubuntu_ip. But when trying to access or map it with "svc_acct" from windows, I get "0x80070043 error the network name cannot be found". I guess I am not accessing correctly from windows.

SAMBA config below (svc_acct is an account set up under linux). When accessing the folder from windows, I get prompted for username/password. Not sure what credential to type in exactly.

samba config:
[work]
path = /home/svc_acct/work
valid users = svc_acct
available = yes
read only = no
browsable = yes
public = yes
writable = yes
force user = svc_acct
create mask = 0777
directory mask = 0777

UPDATE:

All I did to resolve this is by changing samba config's path from path = /home/svc_acct/work to path = /home/svc_acct following this post (last sentence). Then no more prompt for password in windows when I try to click into the folder. Thanks to @sancho.s for suggesting the link.


Solution 1:

You have to match the smb.conf and the Windows share. One option is not limiting who can access the share in Windows with valid users, see e.g. this.

Another option I can think of is you are not setting up the Windows share correctly, as described e.g. in the link above. Note the possibly useful %S macro (official docs here).

You may need to restart the service (I guess you already did it).

You might describe with more detail exactly what you are doing. It is not clear under which conditions you get "0x80070043 error the network name cannot be found" or you get prompted for username/password. Screenshots may help as well.

Against the lack of further information, I am adding a few possible useful links.

The accepted solution in a related question (for VirtualBox, but most/all would apply here). The other answers may help.

how to access samba on a guest Linux behind the VirtualBox NAT?

Share VirtualBox folders in reverse? Guest-Host?

https://serverfault.com/questions/15858/accessing-shared-folders-from-ubuntu-guest-os-in-vmware-workstation-ace-editio

https://www.virtualbox.org/wiki/Sharing_files_on_OSE