Quick Install Guide
A Reminder, not a Tutorial

New Samba Server on Linux and Win9x PC's..

Assumes use of x86 processors and either Slackware or Redhat Linux

NOTE: Samba on Slackware or Redhat uses /usr/sbin for the smb, nmbd and swat executables. Samba 2.0.6 and 2.0.7 use /usr/local/samba/bin . My preference is to use the latter.

1 - download new Samba source http://www.samba.org

2 - mv the smaba source file to /usr/src/samba(My preference, but it can be unpacked anywhere)

3 -unpack the new samba with:

tar zxvf samba-X_X_X_tar.gz -- if the file ends in tar.gz(where XXX is the version)

4 - cd samba-X.X.Xdirectory

5 - Read the README file etc...

6 - cd docs/textdocs - to change to the documents directory

7 - read the UNIX_INSTALL.txt file etc.

8 - cd ../../source to change to the samba-X.X.X source directory

9 - ./configure -- help to check on what is needed

10 - ./configure -- to configure Samba for Linux

11 - make -- to create the binaries
(you may need to copy libcrytpo.a and libssl.a from openssl to/usr/lib)

12 - make install -- to install it or make installbin to just install the binaries.

13 - edit the /etc/smb.conf file as needed.
13a or better yet setup swat to edit and control samba from a web browser.
The swat binaries are installed with samba. You just need to edit some files, etc.

14 - cd ../swat to change to the swat directory in the samba-X.X.X directory.

15 - read the README file for install directions on swat.

16 edit /etc/services to have a line like this:
swat 901/tcp

17 edit /etc/inetd.conf file to have a line like this:
swat stream tcp nowait.400 root /usr/local/samba/bin/swat swat

18 - now to restart inetd with a killall -1 inetd or a kill -1 PID where PID is the pid number of the inetd daemon and it's a number one and not the letter L.

19 - fire up your web browser and http://hostname:901
or use lynx on the server and http://localhost:901 you can use either the name or IP address. example - http://192.168.1.4:901

20 - you should then get a user name/passwrod prompt... login as root.. Only root gets all options and can change all things.

21 - the Samba Web Administration Tool - SWAT should be up..

22 - click on the Globals button at the top..

23 - Fill in the workgroup, netbios name and interfaces..
Interfaces or the IPs on the samba server you will be connectting to.
for example 192.168.1.4/26 11.22.33.44/29 where the 192. is local and 11. is internet
For more on the "/number" see Subnet Planner and IP Addresses or Network Addresses, Broadcast Addresses and Subnet Masks for Class C Addresses
Set security to USER, yes to encrypt passwords and update encrypted..

23b -In the hosts allow put in the IPs that will be connecting to you, for example 192.168.1. 11.22.33. This allows only IPs in the range of 192.168.1.0-255 and 11.22.33.0-255 to access your Samba server. If you leave both hosts allow and hosts deny blank, you will probably be surprised at the the strange log in names recorded in /usr/local/samba/var.. I sure was!!!

NOTE: leaving hosts deny blank is OK if hosts allow is specified.

Once I specified the hosts allow, I could still see the log in attempts and denial recorded in /usr/local/samba/var/log.smb.. You can grep -B1 denied log.smb to see the attempts and when. I get on average at least 1 attempted login per day... It appears to be a "feature?" of Windows 95?? to try to connect to other PCs? and not hack attempts.. If it was a hack attempt into my Samba server, I would not expect to be able to access the denied IP's windows drives and printers... Amazing how many PC drives have been accessable.

Thats pretty much it for configuring the /usr/local/samba/lib/smb.conf via swat.

24 - click on the Status button at the top. You will need to restart both the smbd and nmbd.

25 - you can try the Password section to add new users, passwords etc...

26 - or use smbpasswd -a user to add a new user to samba...
you may need to to cd /usr/local/samba/bin then ./smbpasswd -a user
Use which smbpasswd to see if the PATH is set to use the old previous version of Samba. You may want to rm or mv (safer) the old smbpasswd, nmbd and smbd and /etc/smb.conf and maybe ln -s /usr/local/samba/bin/smbpasswd /usr/sbin/smbpasswd etc..

27 - Restart samba after any changes to the configuration or addiing, changing users or passwords.
Use either swat to do it or use a script like this. /etc/rc.d/samba Just chmod 755 it to make it executable.

connecting to Samba Server from a Win98/95 PC...

28 - Be sure to set up on the PC a user/password that exists on the Samba server.. when the PC boots, be sure to login on the pc with the user/password that exists on the Samba server. If this is not done, you may never ever get on a Samba server directory.

29 - Be sure that networking is enabled. In the network section of the control panel, be sure that you have filled out the identification section for computer name, workgroup and computer description.

30 - bring up a MSDOS prompt and ping the Samba server.

31 - right click on the network neighborhood icon on the desktop. then left click on find computer. put in the Samba servers IP address and find it... it should -- unless you did not login on your Win9x pc with an existing Samba user and the same passwords.

32 - left click on the found computer.. it should open to your login directory.

33 - right click on the folder icon then left click on map network drive.

34 - that is pretty much it folks.

Note: That your Samba Server may or may not show up under the Network Neighborhood on your Windows 9x PC's... If you did the above, it should show as a mapped drive under the My Computer icon.. That's windows?!

Last modfied on Tuesday, 04-Jan-2005 11:24:00 CST
rddecker@lanranger.net