ASML, c/o Hewlett Packard India Software Operation Pvt Ltd.
29, Cunningham Road, 4F1, 30C
Bangalore, Karnataka, 560 052
India
Phone: 91-80-225-1554 x 1062
Fax: 91-80-220-0196
Email: srirag@india.hp.com
Contents:
HOW TO GET STARTED USING SAMBA/iX ON THE HP3000
As more of our customers implement and configure networking services in a heterogeneous environment of MPE, UNIX, and Windows NT servers, along with NetWare, Windows, and NT Workstation clients, the need for knowledge in the area of interoperability becomes a must for our customer's IT professionals. With the release of MPE/iX 6.0 Hewlett Packard CSY is excited to announce the introduction of SAMBA/iX, a network operating system that will provide file and print sharing services for the HP3000. SAMBA/iX will be included with the release of MPE/iX 6.0 free of charge and will be fully supported by HP. CSY is empowering our customers with the knowledge to configure and manage the HP3000 interoperating in these heterogeneous environments, while providing functionality with current applications and network services. The white paper is directed at system integrators, administrators, IT technical staff, and industry consultants who desire a practical approach to the process of HP3000 system integration in a mixed environment. The content will consist of an introduction of the SAMBA product and it's history, while covering such topics of interest to IT professionals such as core functionality and protocols, SMB client, and specifics on installation and configuration. The white paper will conclude with instructions on how to download a trial copy of the soon to be released product as well as setup and instructions on how to get started using SAMBA/iX for the HP3000.
Samba
is an application of choice allowing interoperability between Windows and UNIX/UNIX like systems. It is a group of programs that allows UNIX host to act as a file server for DOS and windows platforms and also provides print services for them. It is freely available under the GNU Public License. Samba allows UNIX/UNIX-like machines to be integrated into a Windows network without installing any additional software on the windows machines. Many different platforms run Samba successfully. There are nearly forty different operating systems which support Samba.Samba (for Unix) has been created in Australia by Andrew Tridgell and a team of contributing people. It is still being enhanced and there are new versions released from time to time. If you take a look at the URL ftp://samba.anu.edu.au/pub/samba/docs/history, you can find an interesting story about how Samba came into existence. Here Andrew talks about how he developed the code by sniffing the packets from Pathworks clients to Pathworks server.
Samba/iX
is the result of porting Samba to MPE/iX under the POSIX environment. It is a solution for those who wish to access their HP3000 from the common Win95/Windows NT Workstation desktop systems.Samba/iX allows full access and functionality between all the popular desktop PC applications and printers both networked and spooled from MPE/iX! It will be available to the HP3000 users through the release of MPE/iX 6.0.
Samba/iX is a suite of programs, which allows an HP3000 running MPE/iX to provide services using a Microsoft networking protocol called SMB. Moreover, this elegant and flexible suite of programs implement a wonderful interoperability feature that allows a MPE/iX host to act as a file/print server for Microsoft WindowsNT, Windows95 and Windows for Workgroups. See figure 1.
Figure 1: The HP3000 interoperating with the Microsoft platforms.
3.1 The Benefits of using Samba/iX:
There are many benefits in having such an MPE/iX & Samba/iX environment. Some of them are listed below:
Smbd |
|
Nmbd |
|
smbclient |
|
smb.conf |
|
smbrun |
|
testparms |
|
testprns |
|
Table 1: The major components
A session is created whenever a client requests one. Each client gets a copy of the server for each session. This copy then services all connections made by the client during that session. When all connections from its client are closed, the copy of the server for that client terminates. The configuration file smb.conf , and any files that it includes, are automatically reloaded every minute.
This program simply listens for such requests, and if its own name is specified it will respond with the IP address of the host it is running on. Its "own name" is by default the name of the host it is running on.
It is a command line program and offers an interface similar to that of the ftp program. Operations include things like getting files from the server to the local machine, putting files from the local machine to the server, retrieving directory information from the server etc.
SMB, which stands for Server Message Block, is a protocol for sharing files, printers, serial ports, and communications abstractions such as named pipes and mail slots between computers.
SMB is request/response protocol and it is implemented on top of the NetBios API. It plays the role of session, presentation, and a part of application layer of the OSI stack. SMB can be used over TCP/IP, NetBEUI, and IPX/SPX. In the case of TCP/IP or NetBEUI, the NetBIOS API is being used. Samba/iX uses SMB over TCP/IP.
The SMB messages can be categorized into four types of messages: sessions control, file, printer and message. Session control messages start, authenticate and terminate sessions. File and Printer commands control file and printer access. Message commands allow an application to send messages to or receive messages from another host. E.g.: WinPopup messages. NetBIOS names are up to 15 characters long, and are usually the name of the computer that is running NetBIOS.
Figure 2: The SMB protocol
5.1 An Example of SMB Conversation:
Figure 3
The above example in figure is to demonstrate the process of connecting to a file space service. The negprot command is used to decide on a protocol extension to be used with the server. The client sends a negprot SMB to the server. This will list the protocol dialects/protocol extensions that it understands. The server responds with the index of the dialect that it wants to use, or 0xFFFF if none of the dialects was acceptable.
Dialects newer than the Core and CorePlus protocols supply information in the negprot response to indicate their capabilities such as max buffer size. The six important protocol extensions of SMB are Core, CorePlus, LAN Manager 1.0, LM 2.0, and NT LM 0.12 and CIFS 1.0.
Figure 4
Once a protocol has been established, the client can proceed to logon to the server. Client now sends a SesssetupX SMB. The response indicates whether the username password pair is valid and if so, can provide additional information. One of the very important aspects of the response is a User ID value that must be submitted with all the subsequent SMBs sent to the server. This is used for user authentication.
Figure 5
After the client has logged in, it can proceed to connect to the file tree by sending tconX SMB to the server. Here tconX stands for " tree connect". The client sends a tcon or tconX SMB specifying the network name of the share that they wish to connect to, and if all is well, the server responds with a TID that the client will use in all future SMBs relating to that share.
After connecting to a tree, the client can now open a file with an open SMB, followed by reading it with read SMBs, writing it with write SMBs, and closing it with close SMBs.
The Common Internet File System protocol runs over TCP/IP and is an enhanced version of the open, cross-platform protocol for distributed file sharing i.e. Server Message Block (SMB). The SMB protocol is the standard way that millions of PC users already share files across corporate Intranets and is the native file-sharing protocol in Windows 95, Windows NT and OS/2.
CIFS enables collaboration on the Internet by defining a remote file access protocol that is compatible with the way applications already share data on local disks and network file servers. CIFS incorporates the same high-performance, multi-user read and write operations, locking, and file-sharing semantics that are the backbone of today's sophisticated enterprise computer networks. CIFS runs over TCP/IP and utilizes the Internet's Domain Naming Service (DNS) for scalability, and is specifically optimized to support slower speed dial-up connections common on the Internet.
Can Samba/iX become a CIFS product?
A group of many vendors are engaged in developing a public version of the SMB protocol. It is expected that CIFS 1.0 will be essentially NT LM 0.12 (protocol extension containing WinNT specific extensions to the protocol) with some modifications for easier use over the Internet. So, we can expect that Samba/iX can have CIFS implementation in the future.
CIFS technology is open, published, and widely available for all computer users. CIFS (SMB) has been an Open Group (formerly X/Open) standard for PC and UNIX interoperability since 1992. CIFS complements HTTP while providing more sophisticated file sharing and file transfer than older protocols such as FTP.
6.1 The Benefits of CIFS:
Integrity and concurrency:
CIFS allows multiple clients to access and update the same file, while preventing conflicts with sophisticated file-sharing and locking semantics. These mechanisms also permit aggressive caching and read-ahead/write-behind without loss of integrity.
Fault tolerance: CIFS supports fault tolerance in the face of network failures. CIFS clients can automatically restore connections and reopen files that were open prior to interruption.
Optimization for slow links: The CIFS protocol has been tuned to run well over slow-speed dial-up lines. The effect is an improved performance for the vast number of users today who access the Internet using a modem.
Security: CIFS servers support both anonymous transfers and secure, authenticated access to named files. File and directory security policies are easy to administer.
Performance and scalability: The performance of CIFS servers is unequaled among network file systems. CIFS servers are highly integrated with the operating system, tuned for maximum system performance, and easy to administer.
This section includes information about using Samba/iX for the customer needs. It also contains information such as setting up the server, installation and making Samba/iX ready to use with clients.
Locating Samba Sources and Binaries: The Samba ported for HP3000 is available in many places. It is also available via Samba/iX Home Page at 3K Associates at the site ftp://ftp.3k.com/POSIX/samba.htm
The current version of Samba/iX on 6.0 is based on Samba 1.9.16p9 and the port uses the LIBBSD package (libraries and include files) available on Jazz (http://jazz.external.hp.com). This is to resolve BSD style routines that are not part of POSIX to successfully compile with HP C/iX (c89 under the Posix shell).
7.1 Samba/iX Installation:
The user can download the binaries from the web and install it on their MPE/iX 5.5 systems to try the newer versions of Samba/iX. The official support will be provided for Samba/iX with MPE/iX release 6.0.
The first step in installation is to transfer the compressed Mover archive to your system to uncompress and unpack it. Then proceed to stream a setup job that performs several other required steps.
1. Logon as MANAGER.SYS and create a SAMBA account.
:HELLO SESSNAME,MANAGER.SYS
: NEWACCT SAMBA, MGR; PASS=<yourpasswd>
2. Logon as SESSNAME,MGR.SAMBA to transfer and unpack the .M.Z archive.
Now, you can use FTP
: HELLO SESSNAME, MGR.SAMBA
:FTP
>open machine
>binary
>get ./mover.bin mover;code=nmprg;rec=128,,f,binary;disc=635
>bytestream
>get ./samba07.M.Z
>close
>quit
:LINKEDIT "altprog mover;cap=ia,ba" * removes PM cap
:/bin/uncompress ./samba07.M.Z
:MOVER "-x ./samba07.M" *extract archive
: PURGE ./samba07.M *no longer needed
:PURGE MOVER
3. Logon as MANAGER.SYS and stream the Samba setup job.
:HELLO MANAGER.SYS
:STREAM JSETUP.PUB.SAMBA
:SHOWOUT JOB= Jobnumber
:PRINT Oxxx.OUT.HPSPOOL *to check for any problems in the spool files.
Now logon as MGR.SAMBA to check the sample config files in /usr/local/samba/lib or /SAMBA/PUB/lib directory (which are just two different names for the same place. Note that the setup job will grant PH capability to MGR.SAMBA so you really need to re-logon after the setup job has completed).
Just copy the configuration files samp-smb.conf, samp-printcap and samp-user.map to smb.conf, printcap and user.map. Modify the entries to suite your Samba/iX environment.
Note: Before starting to use Samba/iX server or client components you should have setup the TCP/IP networking on your HP3000 as well as your PC properly. The Samba/iX web page gives more information on specifics about installation and other practical aspects of Samba/iX installation in detail.
7.2 Initial Tests and Diagnostics of Samba/iX server:
Please make sure that the shares tmp and sambadoc are available on your server. You can use them as sample shares while diagnosing the server. Just look for these entries in the smb.conf to check if they are entered with the correct parameters.
Note 1: If you are using INETD to launch SMBD and NMBD then add two new entries to the /etc/services and /etc/inetd.conf (which are symbolic links to SERVICE.NET.SYS and INETDCNF.NET.SYS configuration files). The entries in these file should be as given below.
/etc/services:
nmbp 137/udp
smbp 139/tcp
/etc/inetd.conf:
nmbp dgram udp wait MGR.SAMBA /SYS/SAMBA/nMBD nmbd
smbp stream tcp nowait MGR.SAMBA /SYS/SAMBA/SMBD smbd
Then start INETD by streaming JINETD.NET.SYS or use INETD.NET.SYS -c (if INETD job was already running). Refer web page http: //www.editcorp.com/sambaix/setup-readme-07.htm for details.
Note 2: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. You can rename NBMON.PPC.SYS before starting the network services. Another 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 no reserved servers. After modifying the file, you must shutdown the network services. Now stream the JCONFJOB.NET.SYS and restart the network services. The nscontrol status=services shouldnt show reserved PDSERVERS. This solution can be used by the customers who do not want Resources sharing/iX (it uses NBDAEMON) on their systems.
In case of problems, check for the job listings for useful error messages and look into the Samba log file /usr/local/samba/var/log.smb and log.nmb for hints. You can control amount of log messages with the "debug level" directive inside the config file or with the command line option -d of SMBD and NMBD.
$smbclient L < Sambaixserver> should display a list of available shares (services) that matches your config file(s) and -if NMBD is running- a list of workgroups and related computers that NMBD could find on your network/subnet.
$smbclient \\\\<Sambaixserver>\\tmp-N -c dir should connect to the tmp share on your 3000 (if you did not remove it from the sample config file) using -N to suppress password prompt and effectively become guest user and display the contents of the associated directory (by passing dir command via -c option). Notice the double backslashes that are needed because the backslash character has a special meaning (escape characters) to the Shell.
Also notice the use of the -c option to avoid entering the interactive mode of SMBCLIENT as it currently has problems reading from the keyboard while waiting for a socket at the same time (select() limitation).
Execute the following commands at the DOS prompt:
C:\>
NET VIEW \\<Sambaixserver> * to view available sharesC:\> NET USE X: \\<Sambaixserver>\sambadoc * to map a share to drive x:
Try connecting to a network drive (Network Connections item in the Disk menu) by explicitly entering the share name like \\<Sambaixserver>\sambadoc by locating the workgroup, computer and share in the browse list of the same window. This will only work if NMBD is running properly.
Now look for the print share names in the available shares on your PC. Try to copy a file to the print share by issuing C:\> COPY <filename> \\<Sambaixserver>\<printsharename>
. Check for the print related entries in printcap and smb.cof for accuracy if there is any problem.We would like to specially recognize Lars Appel as a person who has contributed tremendously to Samba/iX as it was he who originally ported the Samba product for MPE/iX. We would like to thank him for his dedicated work in making Samba/iX available on MPE/iX.
There is a Samba/iX web page collection being maintained by Michael Gueterman at the URL http://www.editcorp.com/sambaix. A great deal of useful information may be found here on Samba/iX.
More information can be found on Samba at http://lake.canberra.edu.au/pub/samba
/. There are links to various Samba related sites from this URL.The book Samba, Integrating UNIX and Windows by John D. Blair contains how to details of using Samba. It is a recommended reading in Samba community.
To subscribe to Samba mailing lists, visit the site http://samba.anu.edu.au/samba/docs/faq/sambafaq-1.htm#ss1.7.It has complete instructions on how to subscribe for the list.
Post your specific Samba/iX queries to the newsgroup comp.sys.hp.mpe. To learn more about Samba issues on other platforms, refer to comp.protocols.smb.