How to get going with the Samba Server for eComStation & OS/2
This page provides a quick cookbook to setup a simple Samba Server on eComstation & OS/2. However it is strongly recommended to read the Samba HOWTO-Collection before attempting to install Samba manually. Although it is at Samba 3.2 level, more than 95% also apply to our Samba 3.0 and Samba 3.3 ports.
Prerequisites for all Samba installations (both manual and WPI:
- Make sure you have a 32bit TCP/IP stack (this is TCP/IP Version 4.1, 4.2x and 4.3x, not Version 4.0x or earlier).
- Uninstall TCPBEUI (NETBIOS over TCPI/IP) using MPTS. Samba works directly with TCP/IP and occupies the same port number as TCPBEUI, therefore you cannot use TCPBEUI and Samba together. Here is a cookbook how to uninstall NetBIOS over TCP/IP manually.
- Samba must be installed on a partition that supports long filenames, such as HPFS(386), JFS or FAT32. Samba cannot be installed on FAT16.
When you downloaded the WPI version the installer will complete all further steps for you. In addition the WPI package comes with scripts and external commands preconfigured.
Note: Most important, there is no need to install baselayout.zip and there is no need to set %UNIXROOT% and %TMPDIR% anymore, when using the WPI. Do not do that!!
Note: Only older builds (3.0.9 and older) rely on Security/2. Newer builds (after 3.0.9) use libc's user/group functions to determine if a user is valid or not.
Further steps and prerequsisites only required for manual installation (don't do this in case you install a recent WPI):
When you downloaded the .zip file you have to procede the manual setup with the following steps:
- SET UNIXROOT=x: where x: is the drive that has a /etc/ path. It is recommended to set UNIXROOT=x:\MPTN (where x: is your bootdrive), because %UNIXROOT%\etc and %ETC% point to the same directory and all the stuff is in one place then. In addition SET TMPDIR=x:\tmp where x:\tmp is any valid directory to put temporary files on.
- Unzip ftp://ftp.netlabs.org/pub/gcc/alpha/baselayout.zip to the %UNIXROOT% drive or directory. Among other directories, this creates the required /etc directory as mentioned in prerequisites step 3. All other directories are not required by Samba.
- Get the current kLibc runtime. It is recommended that you install the libc*.dll files using this package, even if they are already present on your system.
- Edit %UNIXROOT%\etc\master.passwd and add the users that you need. You have to add at least a user named "root" and a user named "guest" (See step 4 why). Look here for syntax of master.passwd (and group)! Please note that you can leave the password field in master.passwd empty or set it to * as the password in this file is never used.
- Remove the old %UNIXROOT%\etc\pwd.db and %UNIXROOT%\etc\spwd.db files.
- Run %UNIXROOT%\usr\sbin\pwd_mkdb.exe %UNIXROOT%\etc\master.passwd. This creates new pwd.db and swd.db files.
- In %ETC% directory create %ETC%\samba directory, in %ETC%\samba create %ETC%\samba\private, %ETC%\samba\pid and %ETC%\samba\lock directories.
- Edit smb.conf which should be put into %ETC%\samba\. A sample smb.conf comes with the .zip package of Samba. A complete reference for the smb.conf file can be found here
Note: The %ETC% path is not necessarily the same as %UNIXROOT%\etc, but it is recommended to make these two point to the same directory. You can achieve that by setting SET UNIXROOT=x:\MPTN.
Note: In older Samba builds the default config file smb.conf has provision for a guest account pcguest this user must be either added to master.passwd, the guest access commented out of smb.conf; or the user changed to a user that does exist in master.passwd.
- Now Samba requires the users to be added using smbpasswd.exe, too. You have to add all users twice: First to %UNIXROOT%\etc\master.passwd (see step 3), then using smbpasswd.exe.
To add a user called 'root' run:
smbpasswd -a root (enter password).
To add the user 'guest' run:
smbpasswd -a guest -n The guest account does not have a password.
Note: In case either 'root' or 'guest' account is missing you will run into several problems. Samba relies upon these 2 accounts to be present.
Note: Currently users can only be renamed from a Windows client.
Note: The smbusers.exe utility perform both steps''
- Start nmbd.exe and start smbd.exe.
To configue Samba server it is best to take SWAT. SWAT is a web Admin interface. Here is a cookbook how to use SWAT as an Apache CGI.