Can't access Ubuntu's shared folders from Windows 7

Have you installed Samba? sudo apt-get install samba

If so, then you need to set a Samba password: sudo smbpasswd -a USERNAME. This command will generate a prompt for a password (substitute USERNAME with your username).

Set a folder to share mkdir /home/USERNAME/sharedfolder

Make a backup copy of your smb.conf file: sudo cp /etc/samba/smb.conf ~

Open your smb.conf file: gksu gedit /etc/samba/smb.conf

Add this to the very end of the file:

[sharedfolder]
path = /home/USERNAME/sharedfolder
available = yes
valid users = USERNAME
read only = no
browsable = yes
public = yes
writable = yes

There should be NO spaces between the lines, and there should be a single space both before and after each of the equal signs. Save and exit gedit.

Restart Samba sudo restart smbd

Use this command to check your smb.conf file for syntax errors: sudo testparm

You now should be able to share from your Windows 7 machine.

Edit:

I understand your trying to access your Ubuntu share from Windows 7 and that you want to do so with a GUI interface.

but when I try to access them (from Windows) it asks for a username and password. No matter what I enter, it won't let me in. How do I configure this to share normally?

To do so you must set up a Samba user/password on your Linux machine as I described above. I could recommend a GUI program for Ubuntu to do this, but frankly it's much more complicated and confusing to do it that way. The program is gadmin-samba and it's in the Ubuntu repository. Caution! you can totally bork your config if you misuse this program. Please let us know what steps you've now taken, and which errors you have encountered. Thanks!


Open Nautilus again as an ordinary user and modify the share to remove guest access. Type gksudo nautilus, navigate to the shared folder and share it again. Share the folder but do not give guest access. Close nautilus.

Go to your Windows box and access the share and provide the Ubuntu username and password.

Ensure your Ubuntu firewall allows incoming access to Samba ports. Ensure Windows firewall allows outgoing access for the same ports.


I have a ubuntu server with a number of computers and laptops running Windows 7 and found that one laptop would not allow access to files in folders stating "You may not have permission etc". Scoured the internet for 3 days - no luck. Finally decided to ask my son who installed the server and he said that Windows 7 can store passwords to the server and sometimes these become corrupt. The simple answer was as follows :-

If you saved a password for a network drive in windows and want to remove it, press the keys [Windows] + [R] to open the windows command line. Then enter

control keymgr.dll

and click on “OK” to open the windows credential manager which allows you to manage and delete passwords saved in Windows.

Highlight server and click REMOVE FROM VAULT

Reboot computer.

This procedure works for Windows XP, Vista and Windows 7.