From MEPIS Documentation Wiki
Configuring shared folders with SAMBA
SAMBA is installed in MEPIS by default and is also the protocol used by Windows machines (although Windows calls it SMB/CIFS). SAMBA is the most complete solution to share files with Windows machines on your network without making changes to the windows machines. SAMBA can also be used by many network media players and Network-attached storage (NAS) devices. SAMBA also offers some other services for interfacing with Windows networks, such as domain authentication, messaging services, and netbios name resolution.
Samba is installed by default in Mepis 11. The configuration file is found in /etc/samba/smb.conf. Any editing of this file needs to be done as root.
When using samba to connect two machines with Mepis installed, or one with Mepis and another Debian based machine, no changes should be required. It is important, however, that the workgroup name of both machines is the same. Therefore if you have not designated the same workgroup name when Mepis was installed you will need to edit the smb.conf file.
Click on the link for use of Samba in the Links section.
Tips and tricks
1. In the case of sharing with a Windows machine, edit the line in the /etc/samba/smb.conf file
security = user
security = share
and uncomment that line. In Control Panel>Home or Work>Network and Sharing Center>Advanced Sharing Settings in Windows 7, check the box under Password Protected Sharing saying "Turn off password protected sharing".
2. When using Dolphin and KDE 4, you can create a direct link to your shares, by clicking on the share, and clicking on "Add to Places". This puts a link in the panel on the left side of Dolphin to your share. You can then edit the share title for better recognition by right clicking on it and choosing Properties.
MEPIS 8.0 and earlier
Method 1: the old-school command line way
Your samba configuration is stored in /etc/samba/smb.conf. Check out the man page for smb.conf for details. Be sure to run testparm after you configure to make sure your config is good, and restart samba to activate the new config.
Method 2: the KDE File Sharing configuration tool
To configure samba so that you can simply right-click on a folder and share (a la Windows):
- MEPIS 6.5: KMenu --> System --> System Configuration (Settings) --> Internet & Network --> File sharing
- MEPIS 7.0 and 8.0: KMenu --> Control Center --> Internet & Network --> File sharing
- Click the "Administrator mode" button and enter your root password
- Select "Advanced sharing", and make sure the "Use Samba" option is checked.
- Click "Allowed users". If you're the only user of the machine, select "all users". Otherwise, specify the users you want to give this power to.
- Click "OK" to close the users window, then "Apply" on the main window.
You can also set up shares directly in the box below, by specifying a folder, or go into advanced options for the server once you've created the share.
Method 3: the KDE Samba configuration tool
This is another KDE tool located in the "Internet & Network" folder of Settings. You must run this as root.
It's pretty thorough, and mostly self-explanatory. This is probably the best tool for those new to Samba who want to set up a serious Samba server.
Method 4: Webmin
If you're going to be setting up a serious "headless server" (instead of just simple sharing from the desktop), you should read up on samba at Samba.org. Webmin also has a plugin for Samba administration, if you have advanced configuration needs.
- Always remember that folder security settings apply for samba as well. If the user account you log in with through Samba doesn't have rights to the folder locally, you won't over Samba either.
- To set up an "open share" with no security, you need to consider the following:
- Samba needs to be in "share mode". This emulates windows98-style sharing, with no user-security.
- The shared folder and its subfolders need full rights for everyone (777).
- The share you configure should be designated public, browseable, writeable, and available. Depending on the config tool you choose, this will be done different ways.
Note: This does not apply to MEPIS 8 or later, but if Samba (SMB4K) does NOT show up in the 'systray' (e.g. if you stop it manually), then you will need to re-START it, via: 'kmenu>internet>connection>samba' Once you (re)start it, it will stay on systray (and should remain there across system-reboots), unless you quit it manually.
For Method 1: A sample /etc/samba/smb.conf file with no security
This configuration has served well on my home network where access to my desktop machine's files is the goal, and security is not an issue. While originally written for an earlier version of MEPIS Linux, this example remains quite serviceable for MEPIS 11.
# Sample configuration file for the Samba suite for Debian GNU/Linux. # # # This is the main Samba configuration file. You should read the # smb.conf(5) manual page in order to understand the options listed # here. Samba has a huge number of configurable options most of which # are not shown in this example # # Some options that are often worth tuning have been included as # commented-out examples in this file. # - When such options are commented with ";", the proposed setting # differs from the default Samba behaviour # - When commented with "#", the proposed setting is the default # behaviour of Samba but the option is considered important # enough to be mentioned here # # NOTE: Whenever you modify this file you should run the command # "testparm" to check that you have not made any basic syntactic # errors. # A well-established practice is to name the original file # "smb.conf.master" and create the "real" config file with # testparm -s smb.conf.master >smb.conf # This minimizes the size of the really used smb.conf file # which, according to the Samba Team, impacts performance # ;*******************section global***************** [global] # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d workgroup = BEARGROUP server string = %h server (Samba %v) hosts allow = 192.168.0. 192.168.1. 192.168.2. 192.168.79. 127. 10.0.0. 10.1.1. socket options = TCP_NODELAY IPTOS_LOWDELAY log level = 1 dead time = 15 wins support = yes hide unreadable = yes passdb backend = tdbsam dns proxy = no host msdfs = no max log size = 1000 map to guest = Bad Password restrict anonymous = no domain master = no max protocol = NT1 ldap ssl = No server signing = Auto oplocks = No level2 oplocks = No acl compatibility = winnt ;*******************section homes***************** [homes] comment = Home Directories guest ok = yes read only = no browseable = no [SHARED] path = /home/silverbear/Shared guest ok = yes read only = no force user = silverbear force group = bears case sensitive = no strict locking = no browseable = yes msdfs proxy = no [FILES] path = /home/silverbear/01-files guest ok = yes read only = no force user = silverbear force group = bears case sensitive = no strict locking = no msdfs proxy = no [MOUNTED] path = /mnt guest ok = yes read only = no force user = silverbear force group = bears case sensitive = no strict locking = no browseable = yes msdfs proxy = no ;*******************section printers***************** [printers] comment = All Printers path = /tmp browseable = no printable = yes guest ok = yes create mask = 0700
For your own use, change "silverbear" to the username whose files are being shared, and "bears" to that user's primary group. "BEARGROUP" should be changed to the name of your network's samba workgroup.
An additional caveat: for some unknown reason, a samba client will fail to connect to the samba server machine when addressing it by machine name. When that happens — smb://klingon fails to connect — what usually succeeds is addressing the machine by network ipa. For example: smb://192.168.1.101
Again, you'll need to substitute your own network router's assigned ipa for the server machine. 192.168.1.101 is for my desktop computer on my network.
I repeat: this gives everyone on the network access to the shares that are specified! Do not use this configuration if security is an issue.