SAMBA V1.9.17p4-VMS2 for OpenVMS	 (VAX and Alpha)	02-Oct-1997

	This is maintenance release. For changes see [.VMS]changes.log.

SAMBA V1.9.17p4-VMS1 for OpenVMS	 (VAX and Alpha)	15-Nov-1997

	Ported by Eckart Meyer <meyer@ifn.ing.tu-bs.de>

	This is the fourth release of Samba for VMS.

	Besides the porting to 1.9.17p4 this release solves the big problem
	with files growing when read from the server. The problem itself
	is still unknown but I reverted the behaviour to that before 1.9.16p11:
	If a client requests a file open in readonly mode, the file is never
	opened read/write (as in 1.9.16p11). We can do this savely because
	the Samba Team invented the new behaviour as a result of a problem
	with POSIX fcntl() - which is not present on fcntl() anyway.

	Looking at the fcntl() it becomes obvious that samba's share modes
	are not working correctly anyway so share mode support was also
	disabled regardless of the parameter "share modes". This is not so
	much important since VMS automatically locks a file opened for write.

	Samba for VMS should compile with DEC-C V5.0 and later
	and should run on all VMS systems from V6.0 on (VAX and Alpha).
	With CRT060 installed, it could even run on a V5.5-2 VAX system.
	Basic functionality (file transfer and printing) have been
	tested now by many people and should work.
	Some features are still not working (like password setting).

	For the current status see

	http://www.ifn.ing.tu-bs.de/ifn/sonst/samba-vms.html

========================= CAUTION =======================
This software is beta test.
=========================================================

STATUS

	Supports UCX or UCX emulation of other TCP/IP packages.
	Tested with UCX. MultiNet, TCPware and Pathway are supported in command
	procedures. CMU/IP does not have UCX emulation and is therefor
	not supported.

	Developed on Alpha VMS V7.0 with DEC-C V5.6.

	Compiled on Alpha VMS V6.2 with DEC-C V5.0 and V7.0 with DEC-C V5.6.
	Compiled on VAX VMS V6.1 with DEC-C V5.0

	Both binary distribution were compiled for VMS V6.0 systems (or
	VAX VMS V5.5-2 with CRT060 installed). Binary means object libraries,
	so they can be linked to the target system.

USING BINARY DISTRIBUTION

	Normally there is no need to get the sources. The binary distributions
	are built for Alpha and VAX VMS 6.0 and higher. This distribution
	also contains all the docs and examples from the original
	Samba distribution.

	Executables are not provided, only the objects. Extract the archive
	to a temporary directory and type

	$ @LINK

	Proceed with ...

INSTALLATION

	What /usr/local/samba is for UNIX, that's the logical SAMBA_ROOT
	in VMS. The value of this logical will be asked in

	$ @INSTALL		(@[.VMS]INSTALL for the source distribution)

	and then all neccesary files will be copied to that directory tree.
	The source directory may be removed then.

	Edit SAMBA_ROOT:[LIB]SMB.CONF to your needs.
	Note that all paths must be written in UNIX syntax, i.e.
	DUA0:[MY.DIRECTORY]MY.FILE becomes /dua0/my/directory/my.file.

	NMBD is started by SAMBA_ROOT:[BIN]NMBD_STARTUP.COM. You may
	change some options.

	Broadcast address and net mask are now correctly determinded.

	Note that uppercase options must be enclosed in quotes! The
	C runtime library will convert parameters to lowercase if no
	quotes are present.

	If you don't already have a time zone logical SYS$TIME_ZONERULE
	(or POSIX$DEFAULT_TZ), you must do so now. See the file
	TIME_ZONERULE.TXT for the format of that logical. Add the definition
	of the logical to SYS$MANAGER:SYSTARTUP_VMS.COM
	(or SYS$MANAGER:SYSTARTUP_V5.COM for older VMS versions).

	A file SYS$STARTUP:SAMBA_STARTUP.COM is generated. Executing this
	file defines the logical SAMBA_ROOT, starts the NMBD process and
	setup SMBD as an UCX service. Also, a logical SAMBA_EXE is defined
	to point to both, the architecture dependent directory and to
	the common directory. The procedure should be included
	in SYS$MANAGER:SYSTARTUP_VMS.COM (or SYS$MANAGER:SYSTARTUP_V5.COM
	for older VMS versions).

	CAUTION: SMBD.EXE is linked against the system symbol table!
		 So, if you ever upgrade your VMS system, you should
		 re-link Samba (however, it's not very likely that the
		 few used symbols will ever change...). A future version
		 of Samba for VMS will use other techniques to change
		 the process owner (possible since VMS V6.2).

MULTINET SUPPORT

	Samba seemed to work fine on a MultiNet V4.0 Rev A system.
	It is expected to work ok on a V3.5 Rev A or Rev B 
	system; not necessarily on earlier MultiNet versions.

	No source changes are required for MultiNet support. The
	command procedures will automatically detect a MultiNet system.

	Make sure that UCX emulation is enabled:

	$ SHOW LOGICAL/SYSTEM UCX$DEVICE
		"UCX$DEVICE" = "BG:" (LNM$SYSTEM_TABLE)

	If this logical is not defined, then enable UCX emulation:

	$ MULTINET CONFIGURE
	NET-CONFIG> SET LOAD-UCX-DRIVER TRUE
	NET-CONFIG> EXIT
	(reboot)

	If you have questions on MultiNet, please ask Aaron Leonard
	of TGV <aaron@tgv.com>.

TCPWARE SUPPORT

	No source changes are required for TCPware support. The
	command procedures will automatically detect a TCPware system.

	If you have questions on TCPware, please ask Bernie Volz of
	Process Software Corporation <VOLZ@PROCESS.COM>.

PATHWAY SUPPORT

	No source changes are required for Pathway support. The
	command procedures will automatically detect a Pathway system
	(this package was formerly known as "Wollongong TCP/IP").

	If you have questions on Pathway, please ask Charles Don Hall of
	Attachmate <chall@eco.twg.com>.

USING THE CLIENT PROGRAMS

	SMBCLIENT	- Seems to work ok. Ignore some error messages
			  concerning "ioctl" for now...

	NMBLOOKUP	- Since it will send broadcast messages to the net,
			  this program must be installed with privileges if
			  unprivileged user should use it.

	SMBSTATUS	- shows a hexadecimal UID which is the complete
			  32-bit VMS UIC. The GID is the VMS UIC group number.
			  If an identifier exists for the UIC, the identifier
			  name is displayed instead.

	SMBPASSWD	- has not been tested at all.

	You may want to define some global symbol like

	SMBCL*IENT :== $SAMBA_EXE:SMBCLIENT

BUILDING FROM SOURCES

	Extract the files to an empty directory and go to the SOURCE directory:

	$ @[.VMS]BUILD		(to rebuild all files: @[.VMS]BUILD ALL)

	This procedure will compile all sources. Then it will call
	@[.VMS]LINK to link all executables. It will ask if @[.VMS]INSTALL
	should be executed to copy files to SAMBA_ROOT:[...].
	(see INSTALLATION).

COMPILE AND LINK WITH MMS/MMK

	If MMS or MMK is present (I have MMK, MMS is not tested):

	$ @[.VMS]SETUP		! Must be called once at the beginning
	$ MMS

	MMS/MMK can be used to build only part of the package
	(e.g. MMS SMBD) or changed modules. Object modules must be
	specified as module.OBJ_arch (arch = VAX or ALPHA).

COMPILE AND LINK WITHOUT MMS/MMK

	$ @[.VMS]SETUP		! Must be called once at the beginning

	Three symbols BLD, LNK and BLDLIS are defined:

	BLD is short for @[path.VMS]BUILD "
	BLDLIS is short for @[path.VMS]BUILD "/LIST=.LIS_'arch'/SHOW=ALL/NOOBJ
	LNK is short for @[path.VMS]LINK

	BLD parameters:

	- none: compiles all sources for which an object file does not exist
		then link all programs. This is the normal use.

	- all: unconditionally compile all sources (Note: some modules
	       will compile more than once. You may want to delete all
	       object files and then use BLD without parameters instead).

	- module name (one module, no path, no extension): compiles this module
	  unconditionally but does not link any executable.

	You can specifiy any compiler qualifier you want with one
	exception: /DEFINE is ignored, because it is used internally
	(this is probably the qualifier you wanted to use - besided /LIST ;-).
	You can specify only one module.

	BLDLIS is usefull to get a complete listing file. If you get
	compiler errors, this is the file to send to me.

	LNK parameters:

	- none: simply link all executables.

	- executable name (one exe, no path, no extension): just link this one.

WHY SAMBA FOR VMS

	There is Digital's Pathworks. It's not that expensive.
	Cost was not the reason to get SAMBA on VMS.
	In short, SAMBA has what is missing in Pathworks for VMS
	V4 and it is easier to handle than Pathworks for VMS
	V5. So it's somewhere between V4 and V5.

	Meanwhile Pathworks for VMS V6 has been released. I haven't seen
	it so far and thus don't know it's advantages and disadvantages.

	Advantages of SAMBA over Pathworks V4:

	- Implements LANmanager V2.
	- Long filenames for Win95 and WinNT.
	- Same LANmanager implementation on all hosts in a mixed environment.
	- Public domain, no license cost.

	Advantages of SAMBA over Pathworks V5:

	- Uses VMS security instead of it's own like PW5.
	- Less resources (well, if lots of clients are connected,
	  SAMBA creates lots of processes...).
	- Easier to manage.
	- Same LANmanager implementation on all hosts in a mixed environment.
	- Public domain, no license cost.

	Advantages of SAMBA over Pathworks V6:

	- Pathworks V6 will (as far as I know)
	  support *only* Alpha VMS V7.1 in the first place. There
	  will be one last VAX version later.

	Disadvantages:

	- May be slower (not really tested until now).
	- TCP/IP only. No DECnet, no NETBEUI.
	- Can't be primary domain controller.
	- Public domain, no guarranteed support.
	- I'm sure, there are more...

PROCESSES and SECURITY

	SAMBA generally creates one process per SMB session. In VMS the process
	is created by the auxilliary server of the TCP/IP package (so called
	in UCX, this may differ for other packages - it's the same
	mechanism than UNIX' inetd). Each session can handle many
	connections and each connection can be established for another
	user (only if samba's security setting is not 'user'). The process
	"becomes" the process of the actual user by changing it's own
	username, UIC, privilege mask and identifiers for the time of
	the access (when idle, the process belongs to SYSTEM). This way
	the process has exactly the rights of the connected user. If a service
	allows for public access, the guest account may be used. The process
	name is changed to reflect the (netbios-) name of the connecting client.

	Generally SAMBA always uses the host's security mechanisms. SAMBA
	does not implement it's own security checking.

PARAMETERS

	Some recommendation for parameters:

	printcap name = /sys$manager/ucx$printcap.dat

		For UCX it's printcap file is o.k. For other
		TCP/IP packages I don't know. If it not present,
		create one (see smb.conf).

	print command = print %f/queue=%p/delete/passall/name="""""%f"""""

		Use VMS DCL PRINT command. Note that you must use "%f"
		as the file name, %s has UNIX file spec syntax.

	lprm command = delete/entry=%j

		You may also specify a command procedure to also delete the
		temp file.

	lpq command

		is ignored. Samba for VMS obtains queue information
		directly using the $GETQUI system service.

	smbrun = smbrun
	
		When using the supplied SMBD_STARTUP.COM this parameter
		must be specified exactly as stated here. Samba uses
		the string for testing the existance of a file and then
		to run it. For VMS, we define the string as a logical
		pointing to the file and as a symbol which runs that file.

	read prediction = yes

		Transfer from server is slightly faster for stream and
		fixed files. For variable record files this may slow down
		the transfer since the "prediction read" reads from
		1024 byte boundaries which causes seek calls. The seek
		routine for record files will have to rewind and re-read
		the files.

	socket options = TCP_NODELAY

		If it is really used by UCX there seem no difference.

	read raw = yes

		Is 'yes' by default. Setting to 'no' slows down
		the transfer.

FILE FORMATS

	Files sent to VMS will always have STREAM format (except for
	print files).

	When reading files from VMS:

	Variable Record, implied carriage return (standard VMS text file):

		The file is read record by record and a CR/LF pair is
		appended. The file appears correctly as a text file at
		the client and is padded with CTRL/Z at the end to fill the file
		up to the size reported by VMS (a VAR file is always
		bigger or same size than a Stream file). When using this
		format, performance may be poor since file seek operations
		may cause the file to be read from the beginning.

	For all other formats the file contents is sent unchanged:

	Stream:

		Client's "native" format. Valid for all types of files.
		Textfiles have a CR/LF pair as line terminator.
		The file's size will be reported correctly.

	Stream_Linefeed:

		The UNIX format. Binary files will appear correctly.
		On text files, each line is terminated by only one LF.
		Some programs may work, other may not (e.g. Windows' notepad).

	Fixed:

		Since the file does not contain any format information, this
		file format should be o.k. for binary files.

	Other formats:

		These are VMS specific and does not make much sense
		at the client.

	Print files are created fixed length record, 512 bytes, null padded.
	This is the only format the symbiont can use for ASCII-Text,
	PostScript and binary (e.g.P PCL). It simply means RAW format.
	Always specify /passall in the print command in smb.conf. This
	means, formatting of ASCII-Text files does not work (but who wants
	to print simple ASCII text today ;-) 

FILE NAMES

	SAMBA for VMS does not distinguish between lower and upper case.
	All file names are presented in lower case to the client.

	File names which contain characters not possible for VMS are converted
	using the same scheme that Digital's Pathworks uses: The character
	is converted to two underlines followed by the two character
	hex ascii code (this means that non-ASCII letters like german
	umlauts are NOT converted to lowercase).

PRINT QUEUES

	Unlike the original SAMBA for UNIX getting information about
	queues does not spawn a new process to execute a shell command.
	Instead, the $GETQUI system service is used to directly obtain
	this information from the queue manager. Since the windows
	print manager (when running) frequently polls the server for
	status information, this saves much resources. Submitting to
	a print queue is done via a subprocess executing a DCL PRINT command.
	This way, the format of the print command can easily be modified
	by the appropriate entries in SMB.CONF. The same is true for
	job removal.

BUGS

	Some features like the password stuff are still not implemented.

	Probably still many unknown bugs...

