2

My girlfriend has to create a samba server to create file sharing possibilities between Ubuntu and multiple Windows 7 computers as a school project. Her teacher is unable to assist her, so I tried to help her a bit.

I have tried multiple guides on how to set up a Samba network (This, this and this), but each of them seems a totally different approach and none of them seem to work.

It could be that I am doing something wrong, but the computers just don't seem to connect, which could be caused by anything...

Summary of what I tried:

  • Install Samba
  • Setup the Server Settings (my Windows workgroup is just 'WORKGROUP' which is the default option)

After this I tried a myriad of things:

  1. Editing the Samba config file to share a folder (as per the official Ubuntu guide)
  2. using the Samba GUI to share a folder
  3. adding new users to samba
  4. Checking if my file and printer sharing option on Windows is enabled
  5. and a lot more which I probably forgot I did

After all this, the Windows computers still don't recognize the file share. It does not show up on the network and running the IP-adres also does not work.

Does anybody have a simple step by step guide on how to create a Samba server to use with Ubuntu 12.04 and Windows 7. It only has to be a simple server, with a enabled password and some files in it. If there is better software than Samba for this job, please let me know and thanks for the help!

Michael
  • 454
  • 1
  • 6
  • 14

2 Answers2

1

First install Samba :

sudo apt-get install samba

Now edit samba config file :

gksu gedit /etc/samba/smb.conf

scroll down to workgroup = WORKGROUP ( or any other work-group)

Now see authentication section :

 #     security = user

Remove the “#” at the front of the line.

To create a share :

[share]
    comment = (Name it as you want )
    path = /path/to/share/folder (path you put your share )
    browsable = yes
    guest ok = yes ( in no it will prompt for password)
    read only = no
    writeable = yes
    create mask = 0775 (permission drwxrwxr-x)

Now if you choose guest ok = no you should create a samba account :

let assume you have a user name user1

sudo smbpasswd user1

and give it password so when you share it will be for authetication.

sudo service smbd restart
sudo service nmbd restart

Now in windows try to connect to your share , it should be found .

Michael
  • 454
  • 1
  • 6
  • 14
nux
  • 38,017
  • 35
  • 118
  • 131
  • Sorry, it did not seem to work. The computer still won't recognize the server. I also tried it at home, with our own computers, and Windows did seem to recognize Ubuntu for a while, but it did not connect. Furthermore, when I restarted both PCs (I thought that it could solve the problem) Windows did not see Ubuntu anymore. – Michael Mar 05 '14 at 18:39
1

Make sure the users are also added to the linux machine, not just samba. They need to be added to both ubuntu and samba. Make sure the users are are also added to the Windows machines and their passwords match the samba passwords.

froy
  • 11
  • 1
  • Thanks for the information! This was difficult to find on the internet, and it was something we needed to know on the long run. Sadly, it does not help our current situation, because Windows does not recognise Ubuntu even when guest access is allowed. Do you have any suggestions? – Michael Mar 05 '14 at 18:45