HPlogo Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00): HP 3000 MPE/iX Computer Systems > Chapter 10 Technical Articles

Introducing Samba/iX

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

by Wendy Cheng
Commercial Systems Division

Overview

Samba/iX is a suite of programs which work together to allow clients to access a server's file space and printers via the Server Message Block (SMB) protocol. Samba is the Server Message Block (SMB) file server that runs on MPE/iX shell operating system on MPE/iX release 6.0. It allows the MPE/iX shell operating system to act as a file and printer server for SMB clients which are mainly for Microsoft LAN Manager and compatible products. These compatible clients can be Windows for Workgroups, Windows 95, Windows NT, or other clients.

Initially Samba/iX was written for UNIX, now it also runs on MPE/iX, NT, and other operating systems. Samba/iX provides the file and printer sharing services between NT and HP 3000 systems. In practice, the user can redirect disks and printers to MPE disks and printers from Windows NT, Windows 95, LAN Manager, or other clients.

A generic UNIX program that is part of the Samba/iX suite has also been ported to MPE/iX Shell operating system. This program allows UNIX or MPE users to use an FTP-like interface to access file space and printers on any other SMB servers. This capability enables these operating systems to act like a LAN server or Windows NT server.

Major Components

Samba/iX contains programs like SMBD and NMBD to provide server functionality and also contains utilities like SMBCLIENT or NMBLOOKUP to provide client functionality. The following lists the major components of Samba/iX:

  • A SMBD program is part of Samba/iX suite. A SMBD process is a server that can provide file and printer services to clients using the SMB protocol. This is compatible with the LAN Manager protocol and can service LAN Manager clients. This program provides selected server directories accessible across the LAN. Typical clients are PCs that use Windows 95 or Windows NT to access the server "share" as "network drive."

  • A NMBD program provides browsing support, it helps clients to view which workgroups, servers and shares are available on a LAN.

  • A SMBCLIENT utility is part of Samba suite. SMBCLIENT is a client that can access to a SMB (Server Message Block) server. It provides a user interface similar to that of FTP program. Mainly, it is used on UNIX based servers as they typically do not have a Windows File Manager available.

  • A NMBLOOKUP utility allows to query WINS name-servers and to assist with manual NETBIOS name resolution.

  • A TESTPARMS program provides the user to test the Samba configuration file for correctness. If this program reports no problems, the SMBD process will successfully load the configuration.

  • A SAMP-SMB.CNF file is a sample Samba/iX configuration file that contains the runtime configuration information for the SMBD program. This file consists of sections and parameters. A global section is defined to contain the general parameters and defaults. This file also contains the information required for each share and defines attributes like associated directory path, read or write access for each share. This file resides in the /usr/local/samba/lib directory.

File and Printer Sharing Using Samba/iX

With the availability of Samba/iX on a MPE/iX 6.0 system, you can set up your HP 3000 system as a Samba server. In order to set up the HP 3000 system as a Samba server, you have to create a configuration file that basically contains the information required for file and printer sharing services. This Samba configuration file contains information on various shares you may access. This file resides in /usr/local/samba/lib directory and is read when the SMBD server is run. Samba/iX supports both file and printer sharing services. As a result, you can define not only file shares but also printer shares.

A listener process is then started under the control of INETD. The listener process waits for incoming client connection requests and creates child processes as needed. The Samba/iX server side validates user name and password which are sent by the client and grants access to the requested share if it is appropriate.

When the client connection is established, the client can then send requests to the Samba/iX server that allow them to access shares, open files, read and write files.

At the DOS prompt on a PC client, you can use NET VIEW command to retrieve information about available shares from the Samba/iX server. You can use NET USE command to connect to server shares and to map them to disk drivers. These network drivers are then accessible to regular PC applications. You don't need to use DOS commands for connecting or accessing shares, this can also be done from the Windows File Manager.

You can also access server based printers using Samba/iX. Printer sharing works in such a way that the client creates a file on server directory associated with the printer, and then the server process triggers a configurable command to push that file into the MPE spooler.

Starting Samba/iX

Before you start to run Samba/iX server or client components, you should have set up the TCP/IP networking on your HP 3000 system as well as your PC. On the HP 3000 system side, you should have a proper IP address and subnet mask configured in NMMGR as well as NETCONTROL START successfully executed. You must choose to start SMBD and NMBD either as Daemons or under control of INETD.

Disable Resource Sharing

If your system has NBDAEMON.PUB.HPLANMGR running, then SMBD and NMBD will not be able to use ports 137, and 139 as NBDAEMON already binds to them. The workaround solution is to stop the PDSERVER process. The NBMON and NBDAEMON processes will not start because of this. This can be done by modifying the file PDSSERV.NET.SYS by changing the line 7 from 1 to 0. This will setup PDSSERVE for non-reserved servers.

The following shows the steps of making non-reserved servers:

  1. Modify the file PDSSERV.NET.SYS and change the line 7 from 1 to 0.

  2. Shutdown the network.

  3. Stream JCONFJOB.NET.SYS.

  4. Start the network back up.

  5. The nscontrol status=services should show non-reserved PDSERVERs.

Verify Link Configuration

The default assumes that LAN link configuration in NMMGR is SYSLINK. You need to run the following command to get IP address and subnet mask of your HP 3000 system, you will need this information for future Samba/iX configuration file updates with the "interfaces" parameter.

  1. Log into your MPE system

  2. Hello manager.sys

  3. Enter the command Netcontrol status; net=LAN1

The following example displays when you run the command netcontrol status; net = lan1.

     NETWORK NAME:       LAN1
     NETWORK IP ADDRESS:  $0F0DC750 15.13.188.80
     NETWORK SUBNET MASK: $0FF000000 255.0.0.0

Starting SMBD and NMBD as Daemons

  1. Logon as MGR.SAMBA

  2. Copy the sample configuration file smap-smb.conf, samp-printcap and samp-user.map to smb.conf, printcap and user.map. Modify the entries to suit your Samba/iX environment. The samp-smb.conf, samp-princap and samp-user.map files reside in the /usr/local/samba/lib directory.

  3. Check your Samba/iX configuration files with TESTPARM utility. The TESTPARM utility resides in the /usr/local/samba/bin directory. Run the following command: shell/ix> testparm /usr/local/samba/lib/smb.conf.

  4. Start your SMBD listener and NMBD server.

  5. Use the jobs supplied as JSMB.SAMBA.SYS and JNMB.SAMBA.SYS and stream them.

  6. Use SHOWJOB to see if the jobs stay alive, it can look as follows:

     JOBNUM     STATE     JIN     JLIST     JOB NAME
     J#30       EXEC      10S     LP        JNMB,MGR.SAMBA
     J#31       EXEC      10S     LP        JSMB,MGR.SAMBA

Starting SAMBA/iX Under the INETD Control

If you choose to run SMBD and NMBD processes under control of INETD, you should have new entries in SERVICES.NET.SYS and INETDCNF.NET.SYS and then you have to create symbolic links to make SERVICES.NET.SYS link to /etc/services and INETDCNF.NET.SYS symbolic links to /etc/inetd.conf respectively. Perform the following steps:

  1. Logon as manager.sys.

  2. Copy SERVSAMP.NET.SYS file to SERVICES.NET.SYS if SERVICES.NET.SYS doesn't exist. The Following two entries should exist in file SERVICES.NET.SYS:

         nmbp 137/udp
         smbp 139/tcp
  3. Copy INCNFSMP.NET.SYS file to INETDCNF.NET.SYS if INETDCNF.NET.SYS doesn't exist, the following two entries should exist in file INETDCNF.NET.SYS:

         nmbp    dgram   udp   wait   MGR.SAMBA   /SYS/SAMBA/NMBD   nmbd
         smbp    stream  tcp   wait   MGR.SAMBA   /SYS/SAMBA/SMBD   smbd
  4. Use the following two commands to create symbolic links to make SERVICES.NET.SYS link to /etc/services and INETDCNF.NET.SYS links to /etc/inetd.cnf respectively:

         :newlink /etc/services, /SYS/NET/SERVICES
         :newlink /etc/inetd.conf, /SYS/NET/INETDCNF
  5. Stream JINETD.NET.SYS or use INETD.NET.SYS -c (if INETD job was already running) to start SMND listener and NMBD server.

  6. Use SHOWOUT JOB= Jobnumber

  7. Print Oxxx.OUT.HPSPOOL to check for any problems in the spool files.

In case of problems, check for the job listings for useful error messages and look into the Samba/iX log file /usr/local/samba/var/log.smb and log.nmb for hints. You can control the amount of log messages with the "debug level" directive inside the config file.

Stopping Samba/iX

It is important to shutdown Samba/iX before bringing the system down. You can use the following commands to stop Samba/iX:

  1. Use SHOWJOB to see if the jobs stay alive, it can look as follows:

         JOBNUM     STATE     JIN     JLIST     JOB NAME
         J#30       EXEC      10S     LP        JNMB,MGR.SAMBA
         J#31       EXEC      10S     LP        JSMB,MGR.SAMBA
  2. Use the following two commands to stop Samba/iX:

         :abortjob          #smbjobnumber
         :abortjob          #nmbjobnumber

Logging Method

The Samba/iX programs write trace messages into a log file called log.smb or log.nmb by default. The log files reside in /usr/local/samba/var directory.

The level of detail is controlled by a "debug level" option in the Samba configuration file which is smb.conf file. The debug level is an integer from 0 to 5. The high this value is, the more detail will be logged to the log file about the activities of the server. At level 0, only critical errors and serious warnings will be logged. Level 1 generates a small amount of information about operations. Level above 1 will generate considerable amount of trace messages which can be used for trouble shooting problems.

Samba/iX Version

The current version of Samba/iX on 6.0 is based on Samba/iX 1.9.16p9; the port uses the LIBBSD package (libraries and include files) available on Jazz (http://jazz.external.hp.com). This is to resolve the BSD style routines that are not part of POSIX to successfully compile with HPC/iX (c89 under the POSIX shell.)

Feedback to webmaster