File sharing on Debian
Okay here’s how file sharing done on my debian box.(Cheers, if you are surrounded by Windows machines, just like me).
My LAN setup - One ADSL router modem connected to a 8-ports switch, and every single machine connects to the switch. Ideal for LAN games, files/printers sharing, and Internet connection sharing.
Comparing to Windows, Linux offers more details for users to tweak around, for better security and performance. Which, all these are not in my concern. I just want to share files to my friends, and copy some goodies from them too!
Okay, here’s how it goes. First check your package repository, for these 2 packages samba and samba-common, your package manager will probably sort out the dependencies for you. I am using Synaptic. After installing the packages, the system(dpkg) will prompt you for samba configuration. Nothing much to do here, basically just -
1. Choose to run samba as a Daemon.
2. Choose to use Encrypted Password.
3. Choose to create a Samba Password Database.
4. Assign a Hostname.
After all these, you are good to go…to the next part of configuration!
Just to make sure, smbd(samba daemon) is started, login to terminal with root access, type PS AX, you should see entries /usr/sbin/smbd -D and /usr/sbin/nmbd -D.
Okay now, use your favorite text editor in terminal and open this file /etc/samba/smb.conf, this is the configuration file for samba. Look under the “Authentication” section, you should see this part
Codes:
# ”security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
;security = user
What I did is, uncomment(remove ‘;’) this line “security = user” and change that “user” value to “share”.
Warning: It is not recommended to use this method due to security consideration. Don’t try this if your debian box acts as a mission critical server in your network.. My debian box is my personal desktop, so this does the job for me.
[To share]
Now navigate to bottom part of the file which is the “Share Definition” area. This is where you specify the directories you wish to share to the network.
Codes:
[shares]
comment = shares folder
read only = yes
path = /mnt/120g/shares
public = yes
guest ok = yes
This is my directory entry. Here I’ll explain line by line.
1. [shares] = the share directory name( the network will see it), in [] brackets.
2. comment = description of the directory.
3. ready only = granting read access only to the share directory.(use “writeable = yes” if you wish to grant write access)
4. path = the exact location of the directory on your system.
5. public = anyone on the network can see this.
6. guest ok = allow anonymous access into the share.
You can add as many entry as you like to the file, when you feel like “unshare” something, just remove the entry from this file.
Now, use this command to restart your samba, /etc/init.d/samba restart. Your share should be available to the LAN by then.
[To access your LAN]
For me it’s simple, open my Konquerer type “smb://ip address/” or “smb://hostname” to access machines in my network. There are many alternatives in order to do this. Here’s a list.
1. Komba2
2. LinNeighborHood
3. Xsmbrowser
And many others you can find, in my case Konquerer does most of the jobs.
That’s all for this entry, let me know if you have something to share about this topic.
P/S: This is my PERSONAL experience, and I provide no guarantee nor warranty in any form.

Related Post(s)






