If not already present, create a
permanent (e.g. in you user-startup) assign to your Genesis directory. The assign must be
called 'AmiTCP' - e.g. 'assign AmiTCP: work:net/genesis/'.
Note - this is normally done during the installation of Genesis.
Then add the following enteries to your user-start (these must be placed after the
AmiTCP: assign):
set TMPDIR "/T"
path amitcp:samba/bin add
Copy the Samba directory (and all sub-directories) extracted from the archive to
'AmiTCP:'.
Install 'ixemul.library' v46.0 (or later) and 'ixnet.library' v46.0 (or later - currently
comes in the ixemul archive) into 'libs:' This archive can be found in the util/libs/
directory on the Aminet - make sure you get the correct version for your processor!
You now need to make some additions to the Services and InetD databases. Although you can
do this with the GenesisPrefs GUI (don't have this running whilst doing this) it's much
easier (and quicker) to edit the files with a text editor (such as CygnusEd). The files
can be found in 'AmiTCP:db/' and are called 'services' and 'inetd.conf' respectively.
Append these files to the existing databases, ensuring
that your press return (to add a line feed - without this the last line won't be read) at
the end of the last line.
By default, Genesis blocks access to most ports on your Amiga. To ensure that other
computers on the network (with IP numbers in the range of 192.168.0.1 - 192.168.0.255) can
access the Samba shares you need to allow access to ports 137 and 139. This is best done
using GenesisPrefs. In the 'Access' database add the following enteries to the top
(add to the bottom and then drag 'n drop to the top) of the current list:
| Service |
Host/Mask |
Access |
Log |
| netbios-ssn |
192.168.0.* |
allow |
log |
| netbios-ns |
192.168.0.* |
allow |
log |
Although quite logical, the next part may take a while to understand - especially for
Win95/98 users who have no experience with Windows NT. When sharing a folder/drive with
Win95/98 you are given the option to set up a password which is required in order to
access that share. When you try and access that share across the network Win95/98 does not
however care what your user name is, just as long as you know the correct password. Samba
(like Windows NT) works on the principle that it will only allow you to access shares
on the server if you are a known user, you have the correct password and that permission
is given for you to access that share.There are some differences between Samba a Windows
NT as Samba (by default) uses share level security and Windows NT user level security -
I don't however intend to explain the differences here. What you now need to do is
add some users to the 'User' database in Genesis. You will need to run GenesisPrefs in
order to do this. Please note that for some strange reason (I guess it's for easy access)
the 'User' database is not listed with all the other databases, but has it's own entry in
the left hand column of the GUI.
For now I suggest you create 3 user accounts - one called 'user1', another called 'user2'
and the last called 'guest'. Please note that case is sensitive! Enter them into the
database as shown in the table below.
| User name |
Real name |
Home dir |
Shell |
User ID |
Group ID |
Password |
| user1 |
User One |
amitcp:home/user1 |
noshell |
501 |
101 |
workbench |
| user2 |
User Two |
amitcp:home/user2 |
noshell |
502 |
101 |
workbench |
| guest |
Guest User |
amitcp:home/guest |
noshell |
500 |
100 |
(enter nothing!) |
To set the default user name (which for now we want to be 'user1') drag this user to
the top of the listview. Although this is not critical if you only want to use Samba as a
server, the account which the Amiga user has logged on with is important if you want to
act as a client and access shares on a PC running Windows NT (or possibly another other
port of Samba). Note - even if you quit and run Genesis again the 'new' default user will
not be set until you have re-booted the Amiga. You will have to re-boot later, so don't do
it now.
Important note - I have discovered that Samba always refers to user names in lower case.
Therefore if you were to try and connect to a share as user 'Fred', Samba would think that
you were 'fred'. This means that entries in the users database must always be in
lower case.
Although not strictly necessary at this stage, add the following entries to the 'groups'
database (this is found with all the other databases).
| Name |
ID |
Members |
| users |
101 |
(you can type the user names |
| guests |
100 |
in here if you like) |
Hopefully you can see that you now have users 'user1' and 'user2' in a group called
'users' and the 'guest' user in group called 'guests'. The reason for the groups (as far
as Samba is concerned anyway) is that Samba can enable access to shares using either the
user name or the group name (therefore enabling access for multiple users with a single
entry).
Double click on your LAN (that's assuming you are using Samba with ethernet cards?)
interface and select the 'Resolv' tab. Enter the name you want your computer to be known
on the network as in the 'Hostname' string gadget. For this exercise I suggest you call it
'Amiga' - this will become your NETBios name on the Windows PC.
Select the 'Events' tab, select 'Online' from the cycle gadget and enter the following
line as a CLI command:
setenv USERNAME $user
This last line sets the environmental variable 'USERNAME' to the same name as that found
in the environmental variable 'USER' which is set by Genesis. Samba uses the variable
'USERNAME', so if you change user accounts whilst still online, only 'USER' and not
'USERNAME' will be changed - you will have to do this yourself.
What you now need to do is add the Amiga's name ('Amiga') and the PC or other SMB server
name(s) to the 'hosts' database. These enteries are necessary for smbclient to work
correctly. If you have configured your network as described elsewhere on this site then
you will probably have these entries already, but just in case you don't now is the time
to do it.
| IP Addr |
Name |
Aliases |
| 127.0.0.1 |
localhost |
|
| 192.168.0.1 |
winpc |
|
| 192.168.0.2 |
amiga |
|
If you have given the Amiga and PC different names to these, then substitute as
required. As far as I know it is not necessary to add these entries to the HOSTS (e.g.
C:\Windows\HOSTS or C:\WINNT\system32\drivers\etc\HOSTS) file on the PC. Personally I have
not done this and have not noticed any problems. If you do experience problems accessing
the Amiga using the NETBios name and have to keep using the IP address then maybe adding
these will help.
You now need to set up the shares on the Amiga - these are configured in the 'smb.conf'
file that is in the samba/libs/ directory. I suggest (for now) you replace the existing
file with this one which has been configured to work with
the above settings. Load the file into a text editor (such as CygnusEd) and if required
make some changes to the following lines (I have removed some other lines for clarity - do
not delete them!):
workgroup = Workgroup ;This is the name
of your workgroup, if you don't have one leave like this for now.
server string = Amiga A1200 ;This
is the description of your computer that's shown in the Network Neighbourhood.
[ALL] ;This is the name of the share.
comment = All volumes in the system ;This is the comment
(description) given for the share.
valid users = user1 user2 ;Speaks for itself. Enables access
to this share to 'user1' and 'user2'.
path = / ;This is the path that the share name gives access
to. This share gives access to all volumes on your system - if on a 'public' network use
this with caution!
read only = yes ;Change 'no' to enable read/write access.
browseable = no ;This prevents the share from being listed in
the Network Neighbourhood. Set to 'yes' if you want everyone to know that there's a share
which gives access to you whole system!
write list = user1 ;Although set to read only, this option
overrides that setting and allows user1 to write to this share.
[RAM] ;This is the name of the share.
comment = Amiga RAM ;This is the comment (description) given
for the share.
valid users = @users @guests ;As before, but in this example
I have given access to groups of users (that's what the '@' signifies). It is possible to
mix user and groups names - e.g. you could have 'user2 @guests' - therefore preventing
'user1' from accessing this share (bad example though as user1 is the local user anyway!)
.
path = /RAM/ ;Note the way in which the path is written -
Samba (ixemul.library to be exact) does not like Amiga device names - e.g. 'RAM:').
To set up a share to give access to 'DH2:data/music/mods' the path statement should read
'path = /DH2/data/music/mods/'.
read only = yes ;There's no point in
making the ram disk writeable as the SMB client always sees it as being full. Having said
this, when mapped as a network drive the correct amount if free space is shown - even so
you still can't write to it - weird!
browseable = yes ;Let's make the share visible to everyone.
The Amiga is almost ready, but before proceeding I suggest you re-boot (first making sure
you've saved smb.conf and your Genesis config) in order to make the assigns added to your
user-startup and to flush any old versions of ixemul.library/ixnet.library that may
already be resident in memory.
I suggest that the best way to start Samba and Genesis is to launch a small AmigaDOS
script. An example of such a script, looks like this:
sys:rexxc/rx >nil: "if show(p,'GENESIS') then exit 5"
if $RC NOT EQ "0"
echo "Genesis is already running!"
quit
endif
run <>nil: amitcp:genesis <>nil:
waitforport GENESIS
wait 2
run <> nil: amitcp:samba/bin/nmbd <>nil: -D -d 2
There main limitation when using this script in that you must enable (don't forget to save
the config again) the 'Auto-Online' feature for your LAN's network interface (found on the
'Servic' tab). This problem is not unique to Genesis - I have to do the same with Miami.
It seems to have something to do with the timing of running 'nmbd'. I have tried running
it as an 'online event' both with and without a delay, but I always get the same problem.
What is the problem? Well the symptoms are something like this:
The first time I try and 'browse' the Amiga in the Network Neighbourhood I get told that
the server is not configured for transactions (the same happens when trying to obtain a
list of shares using smbclient)! If I connect to a share and then try and 'browse' the
shares list everything is okay - weird! I tried to write an 'intelligent' ARexx script for
Miami/Samba to work round this, but nothing seems to work better (with Genesis) than the
above AmigaDOS script. If anyone has got any thoughts or a solution to this problem then
please, please mail me :)
You will be relieved to know that configuration on the PC is much easier! The following
assumes that you are running Win95/98, but NT4.0 is not so different and I guess if you
are running NT then you have a good idea of what's what anyway?
Before we proceed I must bring to you attention a 'problem' regarding password encryption
that prevents the Windows PC from accessing password protected shares. This affects
everyone running Win95 OSR2 (possibly those running OSR1 with IE4?), Win98 and NT4SP3 or
higher. For an explanation and a solution please read the 'Win95.txt' (this covers Win98
as well) and 'WinNT.txt' files that are found in the samba/docs/ dir. On a small (home)
network then I guess password encryption is not a high priority and therefore this is
probably not a big concern. For those on a larger network security may be more of an
issue. Two possible solutions to this (haven't tried either of these myself) is to have a
NT server controlling your domain and pass all password authentication over to it (see the
'security = server' option in smb.conf) or compile yourself a later version of Samba which
supports encrypted passwords.
Right click on the 'Network Neighbourhood' icon on the desktop and select properties.
Click the identification tab and enter the computers name as 'WinPC' (unless you've called
it something different in the hosts database?), the workgroup as 'Workgroup' (change this
if you did so in smb.conf on the Amiga) and enter a suitable description.
Unless you have a need for any protocol other than TCP/IP (such as NetBEUI or IPX/SPX)
then remove them now. Assuming you've already installed and configured the TCP/IP network
you should see the that TCP/IP is bound to your chosen network adapter. You need both
'File and printer sharing for Microsoft Networks' and 'Client for Microsoft Networks'
installed. To do this click on the 'Add' button and select the first from 'Service' and
the second from 'Client/Microsoft'. Ensure that both of these are checked in the
'Bindings' tab on your chosen network adapter.
Select 'Client for Microsoft Networks' as your Primary Network Logon and click 'OK' to
close the 'Network' control panel. Windows will now re-start your computer. It is possible
to use 'Windows Logon' as your Primary Network Logon, but this doesn't work that well when
trying to access password protected (e.g. non guest) shares.
When Windows re-starts it will now ask you for your username and password - enter 'user2'
and 'workbench' respectively - please note that these are both case sensitive! Now set up
a couple of shares on the PC by doing this (cut from the Windows help file):
- In Windows Explorer or My Computer, click the folder you want to share.
- On the File menu, click Properties.
- Click the Sharing tab, and then click Shared As.
- Click the Access Type you want, and, if necessary, enter a password.
If you have already started Genesis/Samba on the Amiga, when double clicking on the
Network Neighbourhood your should (hopefully!) see two computers listed - 'Amiga' and
'WinPC'. If they don't appear immediately then don't panic as it can take a minute or so
for them to appear. When double clicking on the computers you should see a list of the
shares available on that server. If you can't open the Amiga don't worry for now - I think
this is quite common. With my old AmiTCP/Samba 1.9.16p9 I was lucky if I saw the Amiga in
the Network Neighbourhood!
Select 'Run' from the start menu on the PC and type '\\Amiga\RAM'. Hopefully an explorer
window will open showing the contents of the Amiga's ram disk. If it doesn't then try and
connect using the IP address - e.g. type '\\192.168.0.2\RAM'. Win98 and other IE4 users
can type these entries directly into the path (address) string in an explorer window.
If Windows prompts you for a password then you've probably logged on with the wrong
username, supplied an incorrect password or disabaled the account in Genesis's
'User' database ;-) Try typing the password in again and if it works then you certainly
did enter the wrong password at logon. If you've logged in with the wrong username then
Windows will keep asking you over and over again for another password - give up now, you
won't get in! Log off as the current user and log in as 'user2'. If this now works okay,
try '\\Amiga\ALL' or '\\192.168.0.2\ALL' and with any luck you will see all the Amiga
drives?
Although many things with Samba are case sensitive, I have found the neither NETBios names
nor Samba (on the Amiga anyway - maybe other ports are different?) share names are. In the
above example '\\amiga\all' works just the same. Likewise I have found that when using
smbclient on the Amiga to access shares on localhost (in other words the Amiga) that the
share name is not case sensitive. However share names on a Windows PC (I've only tried
this with 95, 98 and NT4.0) are and are always UPPER CASE. If you get the case wrong you won't
be told that the share doesn't exist! Keep this in mind when using both smbclient and
smb-hander.
Lets suppose you set up a share on 'WinPC' called 'DATA'. To access this using smbclient
type the following at the shell - 'smbclient \\winpc\DATA'. If you did not specify a
password for this share then just press return when prompted, otherwise enter the correct
password - yet again case sensitive! For non-password protected shares you can suppress
the password prompt by adding the '-N' option - e.g. 'smbclient \\winpc\DATA -N'. When
connection to share on a SMB server that cares what your username is (e.g. WinNT),
smbclient obtains your username from the 'username' environmental variable. To double
check your current username type 'echo $username' at the shell.
When connected to a share using smbclient, there are probably 4 main commands to remember.
These are 'dir' to list the current directories contents, 'cd' to change the current
directory, 'get' to retrieve files and 'put' to upload files. A full explanation of how to
use these commands can be found in the 'smbclient.txt' file in the samba/docs/ dir.
To obtain a list of shares on an SMB server type use the '-L' option - e.g. 'smbclient -L
winpc' or 'smbclient -L amiga'. One thing I have found is that a NT server (this includes
NT workstation) will not return a shares list unless you supply a valid username/password
pair using the '-U' option. An example of this would be 'smbclient -L winpc -U
user1%*****' (where ***** is the correct password). One solution could be to set up an
account (maybe the guest account?) on the NT server that does not require a password, but
has very limited (if any) rights. That way all users could obtain a shares list by typing
'smbclient -L winpc -U guest'.
|