view · edit · print · history

This article pertains to:

Basic Samba 3.2.8-r1 for SlugOS/BE 5.3

Possibly the most confusing portion of installing Samba on SlugOS/BE is proper configuration via smb.conf file. You may review other Samba pages on this wiki, in case this one is not going to help you (only tested for the above mentioned configuration).

Install base Samba

opkg update
opkg install samba
opkg install samba-doc (if you need documentation)

If you can manage changing /etc/samba/smb.conf file manually, I believe that you don't need xinetd, nor swat. It also seems to be that there is no need to install openldap or openldap-libs

Copy your original smb.conf file to a backup file

cp /etc/samba/smb.conf /etc/samba/smb.conf.org

Modify your smb.conf, to have similar options to the one below. Make sure, that you specify _your_ network, and _your_ workgroup name

nano /etc/samba/smb.conf

Open second ssh connection, and tail Samba log files

tail -f /var/log/messages /var/log/log.smbd /var/log/log.nmbd /var/log/samba/log.smbd

Restart Samba, and see if there are any errors in the other ssh window. Hopefully, you are done at this point.

/etc/init.d/samba restart

I see one warning/information
standard input is not a socket, assuming -D option
but looks that it can be ignored.

You may also see that your slug became a local master browser for your workgroup
Samba name server MY_SLUG is now a local master browser for workgroup MY_WORKGROUP on subnet

# SlugOS/BE 5.3
# Samba 3.2.8-r1 - opkg install samba

#======================= Global Settings =====================================
  log level = 1   # for debugging only, remove after everything works fine
  workgroup = name_you_want_to_use
  server string = OpenSlug 5.3 samba v. %v  
  security = share
  passdb backend = tdbsam
  hosts allow = localhost
  log file = /var/log/samba/log.%m
  max log size = 50
  interfaces = eth0
  local master = yes
  preferred master = yes
  dns proxy = no 
;  bind interfaces = ixp0, eth0  # startup process complains about this as an unknown param
  socket options = TCP_NODELAY SO_KEEPALIVE SO_SNDBUF=16384 SO_RCVBUF=16384
  display charset = UTF8 # for some reason, those are needed, regardless of what language you use (I use en)
  dos charset = UTF8  # as above
  unix charset = UTF8  # as above
  smb ports = 139  # 

#============================ Share Definitions ==============================
# example for 
    comment = testing share
    path = /test
    public = yes
    writable = yes
    printable = no

Some info about various variables in smb.conf

log level = 1

Keep this variable only during the Samba setup. After you are happy with your Samba behavior, remove it, as it causes to generate extra log entries

security = share
passdb backend = tdbsam

If you use 'share' level security with 'tdbsam' password setting, you don't need to do anything with samba users. It just simplifies the Samba setup. However, if you need to give permissions on a user level, this may not work for you.

hosts allow = localhost

You _need_ to specify your network here, especially if your devices are on different segments.

interfaces = eth0

You want Samba to listen on the Ethernet port. You can use your Slug IP address as well, but 'eth0' does the job here.

local master = yes
preferred master = yes

Those settings should let your Slug be master browser for its workgoup. My feeling is that somehow it doesn't work too well (sometimes it gets stuck while browsing workgroup for few seconds, sometimes works very fast).

;  bind interfaces = ixp0, eth0  # startup process complains about this as an unknown param

Some people suggested using it; however, Samba complains during the startup that it doesn't recognize this variable. Also, I didn't see any difference (of course, as it doesn't use it).


You may want to experiment with buffer sizes, to check what works the best for you (e.g., 8192).

display charset = UTF8
dos charset = UTF8
unix charset = UTF8

Someone suggested that those settings are needed for various languages; however, I am using English, and if those are not enabled, my Samba just doesn't work.

smb ports = 139  # 

Should not be needed, but if you see in your log files messages like below, you may try to use it.

  No protocol supported !
view · edit · print · history · Last edited by jacek.
Originally by jacek.
Page last modified on April 09, 2009, at 10:57 PM