Copyright (C) 1999-2000 by Steve Litt, all rights reserved. No warrantee,
use only at your own risk.
NOTE: Although this document uses version 2.0.5a as an example, the
principles hold true for subsequent versions. Just plug in the version
number in place of 2.0.5a.
Log in as root
Only as root will all the tests be done in ./configure. make install and
directory creations also need root.
Back up /etc/smb.conf
Back up /etc/rc.d/init.d/smb
Remove existing Samba with rpm command ( I think it's rpm -x samba, please
verify)
Copy samba-2.0.5a.tar.gz to an empty directory. We'll call this empty directory
install for the rest of this document.
cd to the install directory
tar -xvzf samba-2.0.5a.tar.gz
Creates many directorys below install, including install/samba-2.0.5a/source
Install Samba
Switch to the install/samba-2.0.5a/source directory, make sure you're root
Decide on the desired switches. You can view them with cat configure
| grep '\-\-with' | less. In the next step, place the proper --with
switches as arguments to ./configure.
./configure
make
make install
Note that your executables and most other needed Samba files are now in
the /usr/local/samba tree.
Edit or create /etc/profile.local. Add the following after any
statements changing $PATH or $MANPATH, and before any export statement
in profile.local. If you just created it, these will be the only two statements:
PATH=$PATH:/usr/local/samba/bin
MANPATH=$MANPATH:/usr/local/samba/man
In /etc/profile, add source /etc/profile.local, or .
/etc/profile.local, as appropriate for the shell, below path in /etc/profile.
If the statement already exists you can probably leave it where it is.
Change /etc/rc.d/init.d/smb
Restore /etc/rc.d/init.d/smb from the backup copy (step 3)
Immediately below the line . /etc/rc.d/init.d/functions, add the
following new line so this script has Samba's binaries on its path: PATH=$PATH:/usr/local/samba/bin
Comment out the line [ -f /etc/smb.conf ] || exit 0, and below
it add the line [ -f /usr/local/samba/lib/smb.conf ] || exit 0.
This line terminates the script if it cannot find smb.conf in
the place it expects, so it's necessary to change where it looks.
Create smb.conf
Run testparm. It will issue the following error:
params.c:OpenConfFile() - Unable to open configuration file "/usr/local/samba/lib/smb.conf":
No such file or directory
Put a 1 line [homes] only smb.conf in that directory.
Create locks directory
Run testparm. It will issue the following error:
ERROR: lock directory /usr/local/samba/var/locks does not exist
Create directory /usr/local/samba/var/locks. (I don't know the
correct permissions to give locks. I can tell you that mine is chmod 751
and appears to work just fine.)
Find any other errors by running testparm until it loads [homes]
with no error messages.
Start Samba with /etc/rc.d/init.d/smb restart. This is the command
to restart Samba.
smbclient -NL servername
smbclient '//servername/username' -Uusername
Directory install/samba-2.0.5a/docs contains the distribution
documentation tree. Place a link to it or copy it elsewhere as appropriate.
Reenable SWAT
Verify this line in /etc/services, and that the line isn't commented:
swat 901/tcp
Edit file /etc/xinetd.d/swat to enable swat with minimal security issues.
If necessary for troubleshooting, temporarily remove restrictions, but
do so only while not connected to the Internet.
Verify this or a similar line in /etc/inetd.conf, and that the
line isn't commented.