last update 02/ may / 2002
Samba...
Those notes comes from a Samba debilitating installation experience and are a clear example of how, sometimes, automatic procedures complicate our existances.
For those that didn't know, Samba is a programs suite that provide printing and file sharing services to SMB clients. Or, in simpler words, it means to be able to connect Windows PCs to a GNU/Linux host.
The final result, We hope to reach, was to implement an affordable
file server where users can copy their files in order to make possible an
automatic backup on the server tape unit. When we analyze licence costs
it seems impossible for us to use Windows NT if Windows users could use
Samba services (more infos at http://it.samba.org/samba/samba.html)
because after initial O.S. costs Win NT requires a licence for every
client connected to the server.
I want to explain in detail how it was planned to work: every client
is configured to logon to a NT Domain that in following notes is called
AZIENDA (the italian term for COMPANY). When user executes logon by
login and password (that match those in Linux server) a script is
automatically executed. the script is saved in /home/netlogon
server directory and has the name equal to user logon name and extension .bat
(eg. user john is related to script /home/netlogon/john.bat
.
That script contains the instruction to map user home directory as disk F:
(on client PC). The user can then copy every day his files on disk F: and they
are daily saved.
The chosen GNU/Linux version is Red Hat 6.2 with custom setup. Samba version was (2.0.6) and comes with the RH distribution. This version is nowaday a little bit out to date ad is suffering of some limitations that will be explained to the end of this article.
Once installed the appropriate rpm (samba-2.0.6-9.rpm) we started linuxconf
for samba configuration.
Disaster!!!
I don't want to tell about errors, mistakes, configuration tries, and
all the things We has to face. What We obtained have been (in order): laks of
service start, no availibility through the net, blocked tasks...
I want to explain that problem is due to Linuxconf
(or at last to this wersion in RH 6.2 distribution).
Linuxconf is a beautiful tool, very confortable in use, and provides a good
graphical interface that semplify a lot of system configurations operations
but make some mistakes when it write Samba configuration on file /etc/smb.conf
because it subscribes all previous manual changes.
Similar results have been obtained with grafical interface
SWAT, a smb.conf web configuration tool.
Solution?? Simple!
- We have removed and reinstalled Samba rpm.
- Printed Samba manuals
- Edited by hand /etc/smb.conf file keeping manual in hand until obtaining results we need (comments in the smb.conf standard file helps a lot)
And here are essential modifications to apply to default smb.conf file in order to obtain a Linux Host that works as an NT PDC:
IN the following lines is decided the workgroup/domain name (eg. the company name) and the description that appear when You "browse the network" from client.
workgroup = AZIENDA
server string = Samba Server
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
os level = 33
So let's activate NT domain logon for clients
domain logons = yes
logon script = %U.bat
encrypt passwords = no
I prepared a directory /home/netlogon/
where to save logon
files. This directory is network mapped from following instructions:
[netlogon]
comment = Network Logon Service
path = /home/netlogon
guest ok = yes
writable = no
share modes = no
browseable = no
Such files contain an instruction to connect the user home directory
net use f: \\servername\sharename
that is mapped as
drive F:. It's clear that sharename is the name we give to share
that point to user home directory in following form:
[sharename]
path = /home/username
guest ok = no
writable = yes
browseable = no
valid users = +username
create mask = 0775
directory mask = 0775
Latest notes regard the Samba version used:with 2.0.6 is simple to supply services to Win9.x clients but give some problems with WinNT, Win2K e XP. For these O.S.s I can suggest a good article by Tommaso Di Donato on Pluto Journal