Search Text         
Search Tips?
Search By   And   Or   Boolean   Exact Match   TA #
Search In   Whole Doc   Keywords Sort By  
Product   Sub Product  

View Technical Articles (sorted by Product) New/Updated in the last:    7 days      14 days      30 days             
TA # Date Created Date Updated Resolved Issue?   Printer Friendly Version of This TA   Print Article
  E-mail This TA   E-mail Article
114822 07/27/2001 03:03 PM 06/29/2011 10:52 AM
Yes No
How do I download, compile and install the latest version of SAMBA for OpenServer?
Keywords
openserver open server ose 505 506 5.0.5 5.0.6 samba skunkware netstat 139 afps visionfs cdm client drive mapping gzip compiler cc 5 gcc development kit make configure install swat 901 inetd.conf inetd services smb.conf netbios workgroup nt security net use access denied system error 1240 86 network neighbourhood account specified password authorised login station authorized domain pdc bdc authentication
Release
          OpenServer Enterprise System Release 5.0.5, 5.0.6 
          OpenServer Host System Release 5.0.5, 5.0.6 
          OpenServer Desktop System Release 5.0.5, 5.0.6 
Problem
          How do I compile and install the latest version of SAMBA, v2.2.1?


Solution
          Use the following steps:

          1. Run "netstat -an | grep 139" at the root prompt to see if you
             already have a file and printer server product already running
             on your server such as:

                - A previous version of SAMBA
                - Advanced File & Print Services (AFPS)
                - VisionFS
                - Tarantella 3.1x running Client Drive Mapping (CDM)

          2. Visit http://www.samba.org and select a download site nearest to
             you. For more information on SAMBA, visit a local SAMBA Web site
             local to you.

             The FTP site should identify an image file to download, for
             example:

                samba-2.2.1a.tar.gz

             Download this file to your server into a directory:

                /local/samba

          3. To unpack the file, you will need a copy of "gzip".  Visit:

                http://www.sco.com/skunkware/shutils/index.html#gzip

             and download the latest GZIP volume for the OpenServer
             Distribution Web site, for example:

                gzip-1.2.4-VOLS.tar

             and download it to into a directory:

                /local/utils

             Alternatively, visit the SkunkWare CD provided with your Media
             Kit to obtain the software.

             To install GZIP, untar the file with the command:

                tar xvf gzip-1.2.4-VOLS.tar

             Then run "custom" and select Software -> Install New -> From
             <your_server> -> Media Images -> /local/utils

             Once completed, ensure that /use/local/bin is in your PATH.

          4. To unpack the SAMBA file:

                cd /local/samba
                gunzip samba-2.2.1a.tar.gz
                tar xvf samba-2.2.1a

             This will generate a /local/samba/samba-2.2.1a directory.

          5. Check the contents of:

                samba-2.2.1a/packaging/SCO/OpenServer/README

          6. If you have the GNU Compiler installed, you will be able to
             follow the instructions detailed in the README file.

             Alternatively, you can:

                cd ../../../source
                ./configure

             to compile using the built in OpenServer compiler.  This assumes
             your server has the OpenServer Development Kit installed.

          7. Now run the command:

                make

             this will create the binaries.  Once it is successfully compiled
             you can use:

                make install

             to install the binaries and manual pages.  You can separately
             install the binaries and/or man pages using:

                make installbin

             and

                make installman

             Note: if you are upgrading for a previous version of SAMBA
             you might like to know that the old versions of the binaries
             will be renamed with a ".old" extension. You can go back to the
             previous version with:

                make revert

          8. Once completed, you should find your new binaries in:

                /usr/local/samba

          9. To access the Web version of SAMBA Administration (SWAT) you
             will need to:

             Using your favorite editor, modify /etc/inetd.conf with the
             following line:

swat    stream  tcp     nowait  root /usr/local/samba/bin/swat swat

             and add the following line to /etc/services:

                swat            901/tcp

             To start the services you will need to restart the "inetd"
             process.  To find the process number of this process run:

                ps -ef | grep inetd

                root   349     1  0   Jul-09       ?    00:00:02 /etc/inetd

             In this example the process id is "349".  You need to run:

                kill -1 349

             You should now be able to access SWAT with your favorite browser
             by going to the URL:

                http://<your_server>:901

             Note: A Web server does not need to be running on your server.

             Note: When prompted, you can log in as the "root" user.

          10. You should then have access to the following URL:

                http://<your_server>:901/swat/help/UNIX_INSTALL.html

                This document will explain how to initially configure your
                SAMBA and start the appropriate daemons to start testing
                access to your server.

                You will find example "smb.conf" files to copy to:

                        /usr/local/samba/lib

                in:

                /local/samba/samba-2.2.1a/examples/simple

                or:

                /local/samba/samba-2.2.1a/packaging/SCO/OpenServer

                or:

                Simply create one with just the entries:

                        [global]
                                workgroup = <YOUR_WORKGROUP>
                        [homes]
                                guest ok = no
                                read only = no

          11. Should you have problems with connection from a PC client then
              there is a document called "DIAGNOSIS.txt", which is located in
              the /local/samba directory structure to help you identify
              problems.

                /local/samba/samba-2.2.1a/docs/textdocs/DIAGNOSIS.txt

              In addition:

                When connecting with the command:

                   net use d: \\servername\service

                and you are getting errors such as:

                   System error 5 has occurred
                   Access is denied

              or:

                   System error 1240 has occurred
                   The account is not authorised to login from this station

              or:

                   System error 86 has occurred
                   The specified network password is not correct

              Then it is likely your username is being properly authenticated.
              If you already have a Windows NT domain in your organisation
              then you may wish to add:

                   security = server
                   password server = <nearest_NT_BDC/PDC>

              to the "global" section of "smb.conf"
              or use a simpler "smb.conf" to start with, see above examples.

              If you do not have a Windows NT domain in your organisation
              then you may wish to add:

                   encrypt passwords = Yes

              to the "global" section of "smb.conf" then run:

                   /usr/local/samba/bin/smbpasswd -a <user>

              then enter a password.

              You should then be able to connect to the SAMBA server from your
              Windows client.

          12. Your SAMBA server should appear in the Network Neighbourhood
              or "My Network Places" under the WorkGroup or Domain detailed
              in the "smb.conf" file.  You should then be able to click on
              the server and, assuming you have an account there, you should
              have access to your $HOME directory.

NOTE:
        Downloaded SAMBA and SkunkWare products are unsupported by SCO.

NOTE:
        Here is the DIAGNOSIS.txt file:
--------------------------------------------------------------------------------
!==
!== DIAGNOSIS.txt for Samba release 2.2.0-alpha3 24 Mar 2001
!==
Contributor:    Andrew Tridgell
Updated:        November 1, 1999

Subject:        DIAGNOSING YOUR SAMBA SERVER
===========================================================================

This file contains a list of tests you can perform to validate your
Samba server. It also tells you what the likely cause of the problem
is if it fails any one of these steps. If it passes all these tests
then it is probably working fine.

You should do ALL the tests, in the order shown. I have tried to
carefully choose them so later tests only use capabilities verified in
the earlier tests.

If you send me an email saying "it doesn't work" and you have not
followed this test procedure then you should not be surprised if I
ignore your email.


ASSUMPTIONS
-----------

In all of the tests I assume you have a Samba server called BIGSERVER
and a PC called ACLIENT both in workgroup TESTGROUP. I also assume the
PC is running windows for workgroups with a recent copy of the
microsoft tcp/ip stack. Alternatively, your PC may be running Windows
95 or Windows NT (Workstation or Server).

The procedure is similar for other types of clients.

I also assume you know the name of an available share in your
smb.conf. I will assume this share is called "tmp". You can add a
"tmp" share like by adding the following to smb.conf:

[tmp]
 comment = temporary files
 path = /tmp
 read only = yes


THESE TESTS ASSUME VERSION 2.0.6 OR LATER OF THE SAMBA SUITE. SOME
COMMANDS SHOWN DID NOT EXIST IN EARLIER VERSIONS

Please pay attention to the error messages you receive. If any error message
reports that your server is being unfriendly you should first check that you
IP name resolution is correctly set up. eg: Make sure your /etc/resolv.conf
file points to name servers that really do exist.

Also, if you do not have DNS server access for name resolution please check
that the settings for your smb.conf file results in "dns proxy = no". The
best way to check this is with "testparm smb.conf"


TEST 1:
-------

In the directory in which you store your smb.conf file, run the command
"testparm smb.conf". If it reports any errors then your smb.conf
configuration file is faulty.

Note:   Your smb.conf file may be located in: /etc
        Or in:   /usr/local/samba/lib


TEST 2:
-------

run the command "ping BIGSERVER" from the PC and "ping ACLIENT" from
the unix box. If you don't get a valid response then your TCP/IP
software is not correctly installed.

Note that you will need to start a "dos prompt" window on the PC to
run ping.

If you get a message saying "host not found" or similar then your DNS
software or /etc/hosts file is not correctly setup. It is possible to
run samba without DNS entries for the server and client, but I assume
you do have correct entries for the remainder of these tests.

Another reason why ping might fail is if your host is running firewall
software. You will need to relax the rules to let in the workstation
in question, perhaps by allowing access from another subnet (on Linux
this is done via the ipfwadm program.)


TEST 3:
-------

Run the command "smbclient -L BIGSERVER" on the unix box. You
should get a list of available shares back.

If you get a error message containing the string "Bad password" then
you probably have either an incorrect "hosts allow", "hosts deny" or
"valid users" line in your smb.conf, or your guest account is not
valid. Check what your guest account is using "testparm" and
temporarily remove any "hosts allow", "hosts deny", "valid users" or
"invalid users" lines.

If you get a "connection refused" response then the smbd server may
not be running. If you installed it in inetd.conf then you probably edited
that file incorrectly. If you installed it as a daemon then check that
it is running, and check that the netbios-ssn port is in a LISTEN
state using "netstat -a".

If you get a "session request failed" then the server refused the
connection. If it says "Your server software is being unfriendly" then
its probably because you have invalid command line parameters to smbd,
or a similar fatal problem with the initial startup of smbd. Also
check your config file (smb.conf) for syntax errors with "testparm"
and that the various directories where samba keeps its log and lock
files exist.

There are a number of reasons for which smbd may refuse or decline
a session request. The most common of these involve one or more of
the following smb.conf file entries:
        hosts deny = ALL
        hosts allow = xxx.xxx.xxx.xxx/yy
        bind interfaces only = Yes

In the above, no allowance has been made for any session requests that
will automatically translate to the loopback adaptor address 127.0.0.1.
To solve this problem change these lines to:
        hosts deny = ALL
        hosts allow = xxx.xxx.xxx.xxx/yy 127.
Do NOT use the "bind interfaces only" parameter where you may wish to
use the samba password change facility, or where smbclient may need to
access local service for name resolution or for local resource
connections. (Note: the "bind interfaces only" parameter deficiency
where it will not allow connections to the loopback address will be
fixed soon).

Another common cause of these two errors is having something already running
on port 139, such as Samba (ie: smbd is running from inetd already) or
something like Digital's Pathworks. Check your inetd.conf file before trying
to start smbd as a daemon, it can avoid a lot of frustration!

And yet another possible cause for failure of TEST 3 is when the subnet mask
and / or broadcast address settings are incorrect. Please check that the
network interface IP Address / Broadcast Address / Subnet Mask settings are
correct and that Samba has correctly noted these in the log.nmb file.

TEST 4:
-------

Run the command "nmblookup -B BIGSERVER __SAMBA__". You should get the
IP address of your Samba server back.

If you don't then nmbd is incorrectly installed. Check your inetd.conf
if you run it from there, or that the daemon is running and listening
to udp port 137.

One common problem is that many inetd implementations can't take many
parameters on the command line. If this is the case then create a
one-line script that contains the right parameters and run that from
inetd.


TEST 5:
-------

run the command "nmblookup -B ACLIENT '*'"

You should get the PCs IP address back. If you don't then the client
software on the PC isn't installed correctly, or isn't started, or you
got the name of the PC wrong.

If ACLIENT doesn't resolve via DNS then use the IP address of the
client in the above test.


TEST 6:
-------

Run the command "nmblookup -d 2 '*'"

This time we are trying the same as the previous test but are trying
it via a broadcast to the default broadcast address. A number of
Netbios/TCPIP hosts on the network should respond, although Samba may
not catch all of the responses in the short time it listens. You
should see "got a positive name query response" messages from several
hosts.

If this doesn't give a similar result to the previous test then
nmblookup isn't correctly getting your broadcast address through its
automatic mechanism. In this case you should experiment use the
"interfaces" option in smb.conf to manually configure your IP
address, broadcast and netmask.

If your PC and server aren't on the same subnet then you will need to
use the -B option to set the broadcast address to the that of the PCs
subnet.

This test will probably fail if your subnet mask and broadcast address are
not correct. (Refer to TEST 3 notes above).

TEST 7:
-------

Run the command "smbclient //BIGSERVER/TMP". You should then be
prompted for a password. You should use the password of the account
you are logged into the unix box with. If you want to test with
another account then add the -U <accountname> option to the end of
the command line.  eg: smbclient //bigserver/tmp -Ujohndoe

Note: It is possible to specify the password along with the username
as follows:
         smbclient //bigserver/tmp -Ujohndoe%secret

Once you enter the password you should get the "smb>" prompt. If you
don't then look at the error message. If it says "invalid network
name" then the service "tmp" is not correctly setup in your smb.conf.

If it says "bad password" then the likely causes are:

- you have shadow passwords (or some other password system) but didn't
compile in support for them in smbd
- your "valid users" configuration is incorrect
- you have a mixed case password and you haven't enabled the "password
level" option at a high enough level
- the "path =" line in smb.conf is incorrect. Check it with testparm
- you enabled password encryption but didn't create the SMB encrypted
password file

Once connected you should be able to use the commands "dir" "get"
"put" etc. Type "help <command>" for instructions. You should
especially check that the amount of free disk space shown is correct
when you type "dir".


TEST 8:
-------

On the PC type the command "net view \\BIGSERVER". You will need to do
this from within a "dos prompt" window. You should get back a list of
available shares on the server.

If you get a "network name not found" or similar error then netbios
name resolution is not working. This is usually caused by a problem in
nmbd. To overcome it you could do one of the following (you only need
to choose one of them):

- fixup the nmbd installation
- add the IP address of BIGSERVER to the "wins server" box in the
advanced tcp/ip setup on the PC.
- enable windows name resolution via DNS in the advanced section of
the tcp/ip setup
- add BIGSERVER to your lmhosts file on the PC.

If you get a "invalid network name" or "bad password error" then the
same fixes apply as they did for the "smbclient -L" test above. In
particular, make sure your "hosts allow" line is correct (see the man
pages)

Also, do not overlook that fact that when the workstation requests the
connection to the samba server it will attempt to connect using the
name with which you logged onto your Windows machine. You need to make
sure that an account exists on your Samba server with that exact same
name and password.

If you get "specified computer is not receiving requests" or similar
it probably means that the host is not contactable via tcp services.
Check to see if the host is running tcp wrappers, and if so add an entry in
the hosts.allow file for your client (or subnet, etc.)


TEST 9:
--------

Run the command "net use x: \\BIGSERVER\TMP". You should be prompted
for a password then you should get a "command completed successfully"
message. If not then your PC software is incorrectly installed or your
smb.conf is incorrect. make sure your "hosts allow" and other config
lines in smb.conf are correct.

It's also possible that the server can't work out what user name to
connect you as. To see if this is the problem add the line "user =
USERNAME" to the [tmp] section of smb.conf where "USERNAME" is the
username corresponding to the password you typed. If you find this
fixes things you may need the username mapping option.

TEST 10:
--------

Run the command "nmblookup -M TESTGROUP" where TESTGROUP is the name
of the workgroup that your Samba server and Windows PCs belong to. You
should get back the IP address of the master browser for that
workgroup.

If you don't then the election process has failed. Wait a minute to
see if it is just being slow then try again. If it still fails after
that then look at the browsing options you have set in smb.conf. Make
sure you have "preferred master = yes" to ensure that an election is
held at startup.

TEST 11:
--------

From file manager try to browse the server. Your samba server should
appear in the browse list of your local workgroup (or the one you
specified in smb.conf). You should be able to double click on the name
of the server and get a list of shares. If you get a "invalid
password" error when you do then you are probably running WinNT and it
is refusing to browse a server that has no encrypted password
capability and is in user level security mode. In this case either set
"security = server" AND "password server = Windows_NT_Machine" in your
smb.conf file, or enable encrypted passwords AFTER compiling in support
for encrypted passwords (refer to the Makefile).


Still having troubles?
----------------------

Try the mailing list or newsgroup, or use the tcpdump-smb utility to
sniff the problem. The official samba mailing list can be reached at
samba@samba.org. To find out more about samba and how to
subscribe to the mailing list check out the samba web page at
              http://samba.org/samba

Also look at the other docs in the Samba package!

--------------------------------------------------------------------------------

NOTES:
        Should you receive error messages regarding "libncurses.so.4" ensure
        that /usr/local/samba/bin is linked to /usr/local/samba/sbin.

        Earlier versions of OpenServer may require the Skunkware package
        "ncurses" to be installed as a pre-requisite.

SEE ALSO:
         

        Configuring Samba Server as a Primary Domain Controller (Ref. #000313-0009)

        Troubleshooting a Samba Server (Ref. #000412-0020)

        File and Print Server: Samba on OpenLinux 3.1 (Ref. #011101-0012)

        TA # 116682, "How do I get SAMBA configured and running on my OpenLinux 
system?"

        TA # 118223, "Is there any documentation for OpenLinux on how to configure an 
OpenLinux 3.1.1 as a BackOffice Server?"

        TA # 114823, "How do I download, compile and install the latest version of 
SAMBA for UnixWare/Open UNIX 8.0.0"

        Configuring Windows Clients:

            http://www.oreilly.com/catalog/samba/chapter/book/ch03_01.html
            http://www.oreilly.com/catalog/samba/chapter/book/ch03_02.html

        Troubleshooting Samba:

            http://www.oreilly.com/catalog/samba/chapter/book/ch09_01.html
            http://www.oreilly.com/catalog/samba/chapter/book/ch09_02.html
            http://www.oreilly.com/catalog/samba/chapter/book/ch09_03.html

        http://www.samba.org

        http://www.sco.com/skunkware/samba/
Back to Search ResultsBack to Search Results