Guide to installing Samba on OpenVMS Alpha and VAX -------------------------------------------------- This document describes how to install and configure Samba on OpenVMS AXP and VAX. It has been tested on a LAN with 2 pcs. Author: Alex Wong, May 2004, alw1746 at yahoo com au - Tested environment: Samba 2.2.8, OpenVMS 7.3 Alpha and VAX, TCPIP 5.1, Win2K SP4 Alpha Installation ------------------ - Configure timezone with sys$manager:UTC$TIME_SETUP.COM - If you are running an out-of-box OpenVMS 7.3, you must install the following patches or the Samba link will fail with unresolved symbols. Download from ftp://ftp.itrc.hp.com/openvms_patches/alpha/V7.3/ VMS73_PCSI-V0200.PCSI-DCX_AXPEXE VMS73_UPDATE-V0300.PCSI-DCX_AXPEXE VMS73_ACRTL-V0600.PCSI-DCX_AXPEXE - Install in the following order: RUN VMS73_PCSI-V0200.PCSI-DCX_AXPEXE PRODUCT INSTALL VMS73_PCSI relogin RUN VMS73_UPDATE-V0300.PCSI-DCX_AXPEXE PRODUCT INSTALL VMS73_UPDATE reboot RUN VMS73_ACRTL-V0600.PCSI-DCX_AXPEXE PRODUCT INSTALL VMS73_ACRTL reboot - Download from http://www.pi-net.dyndns.org the following: SAMBA-2_2_8-OBJ-20041021.ZIP SAMBA-2_2_8-SRC-20041021.ZIP - Unzip the archives and extract the files: unzip -"V" SAMBA-2_2_8-OBJ-20041021.ZIP unzip -"V" SAMBA-2_2_8-SRC-20041021.ZIP - Restore the savesets: BACKUP SAMBA-2_2_8-SRC-20041021.BCK/SAVE/SEL=[SAMBA-2_2_8-SRC...] INV120$DKB0:[FREE.SAMBA...] BACKUP SAMBA-2_2_8-OBJ-20041021.BCK/SAVE/SEL=[SAMBA-2_2_8-SRC...] INV120$DKB0:[FREE.SAMBA...] - Build Samba: SET DEF INV120$DKB0:[FREE.SAMBA.SOURCE.VMS] @LINK @INSTALL - delete the following line from SYS$STARTUP:SAMBA_STARTUP.COM (it should be in SYSTARTUP_VMS.COM) $ DEFINE/SYSTEM/EXEC/NOLOG SAMBA_ROOT INV120$DKB0:[SAMBA.]/TRANS=CONCEALED - add to SYSTARTUP_VMS.COM in the following order: $ DEFINE/SYSTEM/EXEC/NOLOG SAMBA_ROOT INV120$DKB0:[SAMBA.]/TRANS=CONCEALED !MUST BE FIRST $ @SYS$STARTUP:TCPIP$STARTUP !MUST BE AFTER SAMBA_ROOT $ @SYS$STARTUP:SAMBA_STARTUP !MUST BE AFTER TCPIP - add the following lines to SYS$STARTUP:SAMBA_SHUTDOWN.COM just before it exits: $ nmbfile=f$search("samba_root:[var.locks]nmbd.pid") $ if nmbfile .nes. "" then delete/nolog 'nmbfile' - add to SYLOGIN.COM or LOGIN.COM: $ @SAMBA_ROOT:[BIN]SAMBA_COMMANDS.COM - add to SYSHUTDWN.COM $ @SYS$STARTUP:SAMBA_SHUTDOWN - Edit SAMBA_ROOT:[LIB]SMB.CONF to suit your needs. The minimalist example below sets up Samba for: - workgroup called HOME (must be same as PCs) - netbios name of INV120 (this appears in My Network Places) - wins support (only if there is no other WINS server - see docs on wins server) - sysdev share for the system disk - access to sysdev for SYSTEM account only - encrypted passwords for Win2K,XP - allows any host to connect [global] workgroup = HOME netbios name = INV120 security = user log file = /samba_root/var/log.%m log level = 0 encrypt passwords = yes deadtime = 10 preferred master = No local master = No domain master = No dns proxy = No wins support = Yes default service = default guest account = SAMBA__GUEST create mask = 0744 printing = bsd print command = print %f/queue=%p/delete/passall/name="""""%s""""" map archive = No share modes = No delete readonly = Yes [sysdev] comment = System disk path = /sys$sysdevice/000000/ valid users = SYSTEM public = No writable = yes [printers] comment = All Printers path = /dsa1/pcfs_spool/default create mask = 0700 guest ok = Yes printable = Yes browseable = No - add SYSTEM account (ignore warning): $ smbpasswd:==$samba_root:[bin]smbpasswd.exe $ smbpasswd -a SYSTEM - Reboot the system and check the following: $ SHOW LOG SAMBA* (LNM$SYSTEM_TABLE) "SAMBA_ALTERNATE_DIRECTORY_PROTECTION" = "1" "SAMBA_EXE" = "SAMBA_ROOT:[BIN]" "SAMBA_LOG" = "INV120$DKB0:[SAMBA]" "SAMBA_ROOT" = "INV120$DKB0:[SAMBA.]" "SAMBA_TMPDIR" = "SAMBA_ROOT:[TMP]" $ PIPE SHOW SYMB * | SEARCH SYS$INPUT SAMBA CONVERT_TDB == "$SAMBA_ROOT:[BIN]CONVERT_TDB.EXE;0" MAKE_PRINTERDEF == "$SAMBA_ROOT:[BIN]MAKE_PRINTERDEF.EXE;0" MAKE_SMBCODEPAGE == "$SAMBA_ROOT:[BIN]MAKE_SMBCODEPAGE.EXE;0" MAKE_UNICODEMAP == "$SAMBA_ROOT:[BIN]MAKE_UNICODEMAP.EXE;0" NMBLOOKUP == "$SAMBA_ROOT:[BIN]NMBLOOKUP.EXE;0" RPCCLIENT == "$SAMBA_ROOT:[BIN]RPCCLIENT.EXE;0" SMBCACLS == "$SAMBA_ROOT:[BIN]SMBCACLS.EXE;0" SMBCLIENT == "$SAMBA_ROOT:[BIN]SMBCLIENT.EXE;0" SMBCONTROL == "$SAMBA_ROOT:[BIN]SMBCONTROL.EXE;0" SMBPASSWD == "$SAMBA_ROOT:[BIN]SMBPASSWD.EXE;0" SMBSPOOL == "$SAMBA_ROOT:[BIN]SMBSPOOL.EXE;0" SMBSTATUS == "$SAMBA_ROOT:[BIN]SMBSTATUS.EXE;0" TDBDUMP == "$SAMBA_ROOT:[BIN]TDBDUMP.EXE;0" TDBTOOL == "$SAMBA_ROOT:[BIN]TDBTOOL.EXE;0" TESTPARM == "$SAMBA_ROOT:[BIN]TESTPARM.EXE;0" TESTPRNS == "$SAMBA_ROOT:[BIN]TESTPRNS.EXE;0" $ SHOW SYS : 00000117 NMBD LEF 5 1229 0 00:00:00.90 792 274 $ TCPIP SHOW SERVICE * SMBD 139 TCP SMBD 0.0.0.0 Enabled SWAT 901 TCP SWAT 0.0.0.0 Enabled $ TESTPARM (ignore warning) Load smb config files from /samba_root/lib/smb.conf Processing section "[sysdev]" Processing section "[printers]" Loaded services file OK. WARNING: lock directory /samba_root/var/locks should have permissions 0755 for b rowsing to work Press enter to see a dump of your service definitions $ SMBSTATUS Samba version 2.2.8 Service uid gid pid machine ---------------------------------------------- No locked files - If all is fine, map a drive on Windows 2000 client using Windows Explorer: Tools -> Map Network Drive Drive: G: Folder: \\inv120\sysdev Connect using a different user name User name: SYSTEM Password: - You can also browse to your Samba server using Windows Explorer: My Network Places -> Entire Network -> Microsoft Windows Network -> Home -> Inv120 - From DCL, you can connect to shares on a client PC in an FTP-like fashion(the shares must be set up on the PC first). Example connects to PC 'inv05' with share name 'data' using administrator. $ smbclient //inv05/data "-U" administrator Password: smb: \> help - Send popup messages to Win2K clients: $ smbclient "-M" inv05 Connected. Type your message, ending it with a Control-Z Hello from smbclient ^Z - Get list of shares available on a host: $ smbclient "-L" inv120 "-U" SYSTEM Password: - The following files are useful for troubleshooting purposes: SAMBA_ROOT:[VAR]*.LOG SAMBA_ROOT:[VAR]LOG.* - To debug NMBD, kill the NMBD process, then start it manually. $ nmbd :== $samba_root:[bin]nmbd $ nmbd "-id2" !nmbd -? for other options - To debug SMBD, disable the TCPIP service, then start it manually. $ tcpip disable service SMBD $ smbd :== $samba_root:[bin]smbd $ smbd "-id2" !smbd -? for other options - You can also use SWAT for setup tasks, provided TCPIP SWAT service is enabled. Just point your Internet browser to : http://:901 VAX Installation ---------------- - The installation is very similar to Alpha 7.3 except the patches are not required for Samba to link properly. Remember to download the Samba VAX object zip. - If you encounter constant problems connecting to Samba eg. specified path not found, semaphore timeouts, etc most likely your VAX box is too slow. When a client connects to Samba, TCPIP will spawn a child process called SMBD__pid to handle the connection. Process creation is a very cpu-intensive task and if you are running say a SIMH (VAX emulation on PCs) system, the client will timeout before the child process gets a chance to talk to it. - As a really crude workaround, disable the TCPIP SMBD service and run a detach process that creates a child process called SMBD. When a client connects to Samba, the child is automatically renamed SMBD__pid and will not be accept new connections anymore. Hence, the detach process must constantly scan all process names for absence of SMBD and recreate child process to service new connection. - TCPIP disable service smbd set config ena noservice smbd - Add the following line in SYSTARTUP_VMS.COM: $ DEFINE/SYSTEM/EXEC/NOLOG SAMBA_ROOT INV120$DKB0:[SAMBA.]/TRANS=CONCEALED !MUST BE FIRST $ @SYS$STARTUP:TCPIP$STARTUP !MUST BE AFTER SAMBA_ROOT $ @SYS$STARTUP:SAMBA_STARTUP !MUST BE AFTER TCPIP $ @SYS$STARTUP:SMBCHK_STARTUP !starts SMBCHK detach process - create SYS$STARTUP:SMBCHK_STARTUP.COM $ run/detached - /input=samba_exe:smbchk.com - /output=samba_root:[var]smbchk.log - /uic=system - /process_name=smbchk - sys$system:loginout.exe - create SAMBA_EXE:SMBCHK.COM $ found="SMBD" $ BEGIN: $ context = "" $ NEXTPID: $ pid = f$pid(context) $ if pid .eqs. "" then goto STARTSMB $ prcnam=f$getjpi(pid,"prcnam") $ if prcnam.eqs.found $ then $ wait 00:00:05 $ goto BEGIN $ endif $ goto NEXTPID $ STARTSMB: $ @samba_root:[bin]smbd_startup $ wait 00:00:05 $ goto BEGIN - replace SYS$STARTUP:SAMBA_SHUTDOWN with: $ ECHO == "WRITE SYS$OUTPUT" $ ECHO "[ SAMBA shutdown being executed ]" $ ECHO "[ Disabling TCPIP services SWAT... ]" $ TCPIP DISABLE SERVICE SWAT $ ECHO "[ TCPIP services SWAT disabled ]" $ prclist="SMBCHK,SMBD_,SMBD,NMBD" $ num=0 $ LOOP: $ pnam = f$element(num,",",prclist) $ if pnam .eqs. "," then goto finish $ plen=f$length(pnam) $ BEGIN: $ context = "" $ NEXTPID: $ pid = f$pid(context) $ if pid .eqs. "" then goto nextprc $ prcnam=f$getjpi(pid,"prcnam") $ if f$extract(0,plen,prcnam) .eqs. pnam $ then $ stop proc/id='pid' $ echo "[ Terminating ''prcnam' process... ]" $ else $ goto nextpid $ endif $ NEXTPRC: $ num=num+1 $ goto loop $ FINISH: $ nmbfile=f$search("samba_root:[var.locks]nmbd.pid") $ if nmbfile .nes. "" then delete/nolog 'nmbfile' $! $ ECHO "[ SAMBA shutdown complete ]" $ EXIT