Samba

By installing Samba, you will be able to access your plug computer's files locally on your network, on Windows, Mac, and Linux computers, as well as some Samba-enabled devices. This is also a crucial part of the CUPS print server.

Installation
Run the following, and answer yes to all questions:
pacman -Sy samba avahi

Now we create a user that will be used for guest access. Use all defaults and pick a password.
adduser pcguest

Add the new guest account to samba. (Use a blank password since it's a guest account).
smbpasswd -a pcguest

Note: This will not work until you have created the configuration file below.

The Samba server will not launch without a configuration file.

Configuration
To configure your Samba install, you need to create a smb.conf file. Below is a very simple configuration file. (Check the bottom of this page for a link to Samba configuration help. Any Samba guide will work.)

nano /etc/samba/smb.conf

Here's a sample configuration file that should allow full public access to the first plugged in drive (adjust the drive's path to match the path to the drive you want to share):

[global] workgroup = WORKGROUP server string = ALARM netbios name = ALARM security = share load printers = no printing = bsd printcap name = /dev/null disable spools = yes log file = /var/log/samba/%m.log max log size = 50 dns proxy = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072 SO_KEEPALIVE [ArchLinuxARM] path = /media/mnt_sdx1/ read only = no public = yes writable = yes force user = root

In order to avoid some Windows 7 related errors edit /etc/security/limits.conf, scroll down to the end of the file and add the following line:

* - nofile 16384

Save the file and reboot in order for the changes to take effect.

Starting the Server
To start Samba, run:
rc.d [start|stop|restart] samba

To start Samba on boot, edit /etc/rc.conf, scroll down to the end of the file and add "samba" to the list of DAEMONS.

More Information
This guide will help you fine-tune Samba to fit your needs: Samba How-To.

If you would like to configure Samba for password-protected sharing as well as public sharing, see the "/etc/samba/smb.conf" below. This allows all users password access to the root share and "Media" share. Guest users without a password are only allowed to read/write to the "Media" share.

[global] workgroup = WORKGROUP server string = ALARM netbios name = ALARM security = user null passwords = yes map to guest = bad user log file = /var/log/samba/%m.log max log size = 50 dns proxy = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=131072 SO_SNDBUF=131072 SO_KEEPALIVE [Root] path = / read only = no public = yes writable = yes guest ok = no [External] path = /media/External read only = no public = yes writable = yes guest ok = yes

Reducing memory usage
Samba is known memory hog. On a system with limited amount of RAM, such as the DockStar, it may be useful to turn off some features in exchange for a reduction of its footprint.

Disable NetBIOS name resolution
If the network has other means to resolve the hostnames for Samba server, this feature is only used to find out which machines are currently up for sharing (i.e. to populate the Network/Network Neighborhood on Windows clients). If you are accessing the shares through static mappings, this feature is unnecessary and "nmbd" can be stopped. Edit your "/etc/samba/smb.conf" and add this line to the [global] section:
disable netbios = yes

Then, edit "/etc/conf.d/samba" and remove "nmbd" from the "SAMBA_DAEMONS" so that it looks like this:
# # Configuration for the Samba init script # # space separated list of daemons to launch SAMBA_DAEMONS=(smbd) #SAMBA_DAEMONS=(smbd nmbd winbindd)

Please note that, unlike in "/etc/rc.conf", you can't disable a daemon by prepending its name with an exclamation mark. You'll have to delete it altogether.

Disable Printer Support
Disabling printer support in Samba can save RAM if it's not needed. Add the following lines to the [global] section of your "/etc/samba/smb.conf":
load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes