Archive

Posts Tagged ‘LAN’

Sharing files and folders from Ubuntu PC with Windows Network Support

October 9, 2009 2 comments

Do you believe that sharing files and folders across your network from your Ubuntu PC is every bit as easy as sharing files in Windows? Well, I dont. It might be because I dont know the appropriate method of sharing files in Ubuntu.

Here is the scenario. All users in the LAN, except me, are using Windows OS. Often, my friends complain that they are not able to access files in my laptop. These frequent complaints prompted me to have a look at the issue. So here is at how I resolved the issue.

  1. I found out that we need Samba for Windows network support.
  2. Install samba package by typing the following command
    sudo apt-get install samba
  3. Now edit the smb.conf file by the following command
    sudo vim /etc/samba/smb.conf
  4. Add the following text to the end of ‘smb.conf’
    [fileName]
    comment = Write something about the file here
    path =  /media/
    browseable = yes

    read only = yes

    guest ok = yes

    You will have to set the path to the file you desire to share.( eg. path= /media/disk)

  5. Change the security to share levelBy default the security will be set to user level, which will be usually commented :
    #security = user

    Remove the #( to make it as uncomment) and Modify it as :

    security = share
  6. Now the last step is to restart the network by typing the following comment
    sudo /etc/init.d/networking restart

The method told above worked fine in my system. If anyone knows a better way, please comment it here.

If you found the method a bit difficult, you can simply download the below file and paste it in /etc/samba. It is adviced that you keep a backup of the original copy of smb.conf.

Download here

My Conclusion

You can share Linux partitions like home, etc. by a mere right click. To share the Windows partitions, one need to add the following line to the global section of smb.conf

usershare owner only = false

Categories: Linux, Network Tags: , ,