Showing posts with label Samba. Show all posts
Showing posts with label Samba. Show all posts

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.

Wednesday, August 8, 2012

How to install Samba

Since 1992, Samba is an open-source software that your main goal is to remove the barriers of interoperability between different operating systems.

I need Samba to move files from Windows to Ubuntu and vice-versa for work's issues. Hereafter, you can see the steps how to install Samba:

  1. sudo apt-get install samba samba-tools
  2. sudo smbpasswd -a yourusername
    • Type your password
    • Retype your password
  3. mkdir /srv/samba/share
  4. sudo nano /etc/samba/smb.conf
  5. Press Ctrl+W
    • Search for: #security=user
    • remove '#' (from "#security=user" to "security=user")
  6. On bottom of file write the next statements:
  7. [share]
    path = /srv/samba/share
    comment = some random files
    available = yes
    valid users = yourusername
    read only = no
    
  8. sudo restart smbd
  9. testparm /etc/samba/smb.conf

Note: After you typed the last command and got errors message, you have to fix it. But I am 100% sure, it will not show up a error message unless you mistyped some statements.