From Segfault
Jump to navigation Jump to search


gzip -d samba-latest.tar.gz
gpg --recv-keys 0x6F33915B6568B7EA
gpg --verify samba-latest.tar.asc && tar -xf samba-latest.tar

There's also a git repository:

git clone git:// samba-git
cd samba-git


Building and installing Samba3:

git checkout -b stable origin/v3-6-stable
cd source3
./configure --prefix=/opt/samba3 --with-pam && make
sudo make install

For some reason, the resulting binaries are linked to a shared libtevent library, resulting in:

$ ldd /opt/samba3/sbin/smbd | grep not => not found

As a workaround, we could use LD_LIBRARY_PATH to use the newly compiled binaries, e.g.:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/samba3/lib /opt/samba3/bin/testparm /etc/samba/smb.conf


Samba4 uses waf for its build system:

sudo apt-get install python-dev                   # Debian, Ubuntu
sudo yum install python-devel                     # Fedora, SUSE
./configure --prefix=/opt/samba4 --with-pam --without-ad-dc
sudo make install


Samba 3

A smb.conf for simple directory sharing with guest-only access and no printers:

# /etc/samba/smb.conf
workgroup              = EXAMPLE.ORG
server string          = Samba %v
interfaces             =
bind interfaces only   = yes
dns proxy              = no
load printers          = no
printing               = bsd
printcap name          = /dev/null
ea support             = yes

log file               = /var/log/samba/log.%m
log level              = 2
syslog                 = 0
panic action           = /usr/share/samba/panic-action %d
pid directory          = /var/run/samba

security               = user
map to guest           = bad user
guest ok               = yes

# [homes]
# comment              = Home Directories
# browseable           = no
# read only            = yes

path                   = /mnt/share01
read only              = no
browseable             = yes
hide files             = /lost+found

path                   = /mnt/share02
read only              = yes
browseable             = yes
hosts allow            =
force directory mode   = 0755
force user             = root

path                   = /mnt/cdrom
read only              = yes
browseable             = yes
locking                = no


 > printing/print_standard.c:68(std_pcap_cache_reload)
 > Unable to open printcap file /etc/printcap for read!

Samba 4