Tuesday, April 16, 2013

Sharing folders without login - Samba

Samba is an open source software that allows to solve communications problems between Windows and Linux. With Samba, you can share folders, printers for Windows clients and can perform as a Primary Domain Controller (PDC) or as domain member. Samba can also be part of an Active Directory (AD) domain.

As a Systems Administrator, one of first things I wanted to do was share folders on Debian with my Windows to transfer easily files. My Debian is a local Web Server to test my PHP5 applications (yes, I am also PHP5 developer). Why do I want share folders without password? Because it is painful every time I need to login and I am working at home where is no danger around me. No one can crack me at home. At home, it is a great way to share files without login.

    How to install and configure samba
  1. su -
  2. insert your root's password
  3. mkdir /home/yourusername/mysharedfolder
  4. chown nobody /home/yourusername/mysharedfolder
  5. apt-get install samba
  6. nano /etc/samba/smb.conf
  7. security = share
  8. guest account = nobody
  9. [mysharedfolder]
    writable = yes
    path = /path/to/directory
    public = yes
    guest ok = yes
    guest only = yes
    guest account = nobody
    browsable = yes
    
  10. Ctrl+X and then y
  11. service samba restart

Optionally, you can use Samba Web Administration Tool (SWAT) to configure the settings of shared folder.

    How to install SWAT
  1. apt-get install swat
  2. Go to your favorite web browser and type the next URL: http://localhost:901
  3. insert your root login
  4. watch the next video how to configure samba

Samba is very useful tool for who want share files between Windows and Linux and SWAT is also very useful for who want configure settings of sharing easily.

I have created another article about Samba before but this one requires a login. If you want to do login, please read this article.

No comments:

Post a Comment