Tuesday, December 31, 2013

ubuntu 8.04 upgrade samba process

samba 3.0.28a and windows 7 are having a bad day.
i've done all the usual registry tricks and uninstalled KB2536276.  it is time.

of course, i'm running ubuntu 8.04; so no amount of apt-get updating is going to 
bring samba to higher level.
let's sort of roll our own, shall we?  3.4.4 is a nice, stable rev.

pre-prep system.

# apt-get update ; apt-get upgrade ; apt-get apt-get dist-upgrade

what?!  it is time.  this system does nothing but samba anyway... and yes, i have backups.

# apt-get install libldap2-dev libkrb5-dev uuid-dev libpam0g-dev zlib1g-dev build-essential 
# apt-get build-dep samba

# cd ~/
# apt-get source samba
# cat ~/samba-3.0.28a/debian/rules | less

take note of all the switches, we're going to use them later.

time to download the source.

# mkdir -p /usr/local/src/samba
# cd /usr/local/src/samba
# wget http://samba.org/samba/ftp/stable/samba-3.4.4.tar.gz
# tar zxvf samba-3.4.4.tar.gz
# cd samba-3.4.4/source3

if you're working with windows server 2012, just download the samba-3.6.8.tar.gz 
and follow the same instructions...

now, run configure using the os-specific switches:

./configure -–cache-file=./config.cache \
-–prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--with-privatedir=/etc/samba \
--with-piddir=/var/run/samba \
--with-fhs \
--enable-shared \
--enable-static \
--disable-pie \
--with-rootsbindir=/sbin \
--with-pammodulesdir=/lib/security \
--with-pam \
--with-syslog \
--with-utmp \
--with-readline \
--with-pam_smbpass \
--with-libsmbclient \
--with-winbind \
--with-shared-modules=idmap_rid,idmap_ad \
--with-automount \
--with-ldap \
--with-ads \
--with-dnsupdate \
--with-cifsmount \ <-- is not recognized in samba 3.6.8 (rev compat with win 2012)
--with-acl-support \

take note:
sometimes in the process of doing configure your system will bark.  in my case, uuid.h .
note apt-get command above only includes my missing packages; your mileage may vary.

# apt-cache search uuid | grep -- -dev
libblkid-dev - block device id library - headers and static libraries
libossp-uuid-dev - OSSP uuid ISO-C and C++ - headers and static libraries
uuid-dev - universally unique id library - headers and static libraries

neat.  it works.

# make

Using CFLAGS = -O -I. -I/root/samba-3.4.3/source3 -I/root/samba-3.4.3/source3/../lib/popt -I/root/samba-3.4.3/source3/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -DHAVE_CONFIG_H -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/talloc -I./../lib/tevent -I./../lib/tdb/include -I./libaddns -I./librpc -I./.. -I./../lib/popt -DLDAP_DEPRECATED -I/root/samba-3.4.3/source3/lib -I.. -I../source4 -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3

... snip ...

that went okay.

# make install

neat.  i just installed over my old binaries.

take note:
The binaries are installed. You may restore the old binaries (if there
were any) using the command "make revert". You may uninstall the binaries
using the command "make uninstallbin" or "make uninstall" to uninstall
binaries, man pages and shell scripts.

register samba libs.

# echo "/etc/samba" > /etc/ld.so.conf.d/samba.conf
# ldconfig

make sure we've got all the handles for our windows clients set.  to make those permanent, reboot.
otherwise, command-line it.

in "/etc/security/limits.conf" add line: 
* - nofile 16384 

# ulimit -n 16384

then start the daemon.

# /etc/init.d/samba start
* Starting Samba daemons [ OK ]

neat.  it works.

take note:
you may need to re-add the system to your domain; as alluded to in spiffy messages such as the below:

[2013/12/31 10:51:08.876223,  0] auth/auth_domain.c:212(connect_to_domain_password_server)
  connect_to_domain_password_server: could not fetch trust account password for domain 'DOMAIN'
[2013/12/31 10:51:08.876964,  0] auth/auth_domain.c:292(domain_client_validate)
  domain_client_validate: Domain password server not available.

Post a Comment