JLAN Server Installation Guide
JLAN Server Installation Guide
Installation Guide
For Alfresco JLAN Server v6.0
Author: GK Spencer
Table of Contents
1 Alfresco JLAN Server Overview................................................................... 3
2 The JLAN Server Applications...................................................................... 4
2.1 Jar Files............................................................................................................... 4
2.2 org.alfresco.jlan.app.JLANServer............................................................................ 5
2.3 org.alfresco.jlan.app.JLANServerService.................................................................. 5
2.4 JLAN Server XML Configuration File......................................................................... 6
2.4.1 Server Configuration.......................................................................................6
2.4.2 Global Configuration....................................................................................... 6
2.4.3 SMB Server Configuration............................................................................... 7
2.4.4 Cluster Configuration.................................................................................... 12
2.4.5 FTP Server Configuration............................................................................... 12
2.4.6 NFS Server Configuration.............................................................................. 15
2.4.7 Shares Configuration.................................................................................... 17
2.4.7.1 JavaFileDiskDriver Configuration.............................................................. 20
2.4.7.2 DBDiskDriver Configuration.....................................................................21
2.4.7.2.1 DatabaseInterface Configuration....................................................... 25
2.4.7.2.2 FileLoader Configuration.................................................................. 26
2.4.7.2.3 Sample Configurations.....................................................................29
2.4.8 Security Configuration...................................................................................33
2.4.8.1 LocalAuthenticator................................................................................. 34
2.4.8.2 PassthruAuthenticator............................................................................ 36
2.4.8.3 Enterprise Authenticator......................................................................... 37
2.4.9 Share Mapper Configuration...........................................................................38
2.4.10 Drive Mappings Configuration.......................................................................38
2.4.11 Debug Configuration................................................................................... 39
2.4.11.1 Cluster Debug Configuration..................................................................40
Authentication classes
Quota manager
The JLAN Server kit contains a virtual filesystem driver class that maps to the local
filesystem using the java.io.File class and a database filesystem that stores the
filesystem structure in a database table with a custom file loader class used to load
and save the file data. There are sample file loader implementations that use the local
filesystem and database BLOB fields.
The demonstration server applications org.alfresco.jlan.app.JLANServer and
org.alfresco.jlan.app.JLANServerService use an XML based server configuration
implementation.
The default virtual filesystem mapping class provides access to the filesystems defined
in the server configuration plus allows access to a HOME area if the user accessing the
server has a home directory defined in the server configuration.
org.alfresco.jlan.app.JLANServer
Allows the JLAN Server to be started as a console application, or as an
NT service.
org.alfresco.jlan.app.JLANServerService
Allows the JLAN Server to be started as a console application, or NT
service, or Linux/Unix daemon by using the ServiceWrapper from
TanukiSoftware.
The server is configured using an XML configuration file. The application uses the DOM
parser that is part of the Java runtime.
The configuration file defaults to jlanserver.xml in the user home directory, under
Windows this will be in the Documents And Settings\<username> directory. The
configuration file can also be specified on the command line.
In the demo version of the JLAN Server kit the main applications are
org.alfresco.jlan.app.demo.JLANServer and
org.alfresco.jlan.app.demo.JLANServerService.
alfresco-jlan.jar
Contains the core server applications but does not contain the database
interface code for mySQL, Oracle or Cloudscape Derby.
alfresco-jlan-db.jar
Contains the core server applications plus the mySQL, Oracle and Derby
database interface classes.
The database filesystem version of the Jar also requires the appropriate JDBC classes
to be on the classpath.
The JLAN Server requires a JCE provider that implements MD4, MD5 and DES
hashing/encryption algorithms. The kit contains the Cryptix JCE provider, the Cryptix
licence is reproduced below :Cryptix General License
Copyright (c) 1995-2005 The Cryptix Foundation Limited.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND
4
Other JCE providers may be used such as Bouncy Castle, or if you are using the IBM
JDK/JRE this includes the required hashing and encryption algorithms in the standard
kit.
2.2 org.alfresco.jlan.app.JLANServer
The JLANServer application can be run as a console application or as an NT service.
The following command lines show various ways that the server application can be
started:java -jar alfresco-jlan.jar
java -cp .\alfresco-jlan.jar org.alfresco.jlan.app.JLANServer jlanconfig.xml
java -jar .\alfresco-jlan.jar jlanConfig.xml
A sample configuration file is included in the demo kit (jlanserver.xml). The sample
configuration file is setup to use the Win32 NetBIOS interface.
To use the NetBIOS over TCP/IP and/or native SMB interfaces the network broadcast
mask must be configured before the sample configuration file can be used.
The runsrv.bat batch file may also be used to start the server under Windows.
2.3 org.alfresco.jlan.app.JLANServerService
The JLANServerService application uses the ServiceWrapper from TanukiSoftware
(http://wrapper.tanukisoftware.org/) to provide portability and resilience.
The ServiceWrapper is available for a wide range of platforms, including Windows,
Linux, Mac OS X, Irix, HP-UX, Aix, FreeBSD and Solaris.
The JLAN Server kit contains the binaries for Windows, Linux, Solaris and Mac OS X
support in the service\ sub-directory. A pre-configured ServerWrapper configuration
file is included jlansrv.conf. The main JLAN Server configuration file is expected to
be in the user home directory, the jlansrv.conf file only provides the ServiceWrapper
configuration of the JVM, application class, logging, JVM monitoring and NT service
parameters.
To start the JLANServerService under Windows use the JLANServer.exe in the
wrapper\windows sub-directory. To start as a console application use the following
command line:jlanserver -c jlansrv.conf
The ServiceWrapper can also be used to run the JLAN Server as an NT service or
daemon process. To install and start the JLAN Server as an NT service use the
following commands:5
jlanserver -i jlansrv.conf
jlanserver -t jlansrv.conf
Server Configuration
<SMB/> or <CIFS/>
<FTP/>
<NFS/>
Enable the NFS server (mount server and main NFS server)
Global Configuration
<timezone name=.../>
<timezone offset=.../>
Global Configuration
<timezone name=PST/>
<timezone offset=-480/>
Host Configuration
<host name=... domain=.../>
<alias names=name1,name2,../>
<broadcast>n.n.n.n</broadcast>
<smbdialects>..,..</smbdialects>
<comment>...</comment>
<bindto>n.n.n.n</bindto>
<bindto adapter=.../>
<authenticator type=...>
..
</authenticator>
Host Configuration
<authenticator>
<class>...</class>
..
</authenticator>
<netBIOSSMB/>
<netBIOSSMB bindto=n.n.n.n/>
<netBIOSSMB adapter=.../>
<netBIOSSMB platforms=.../>
<tcpipSMB/>
<tcpipSMB platforms=.../>
<tcpipSMB ipv6=enabled/>
Host Configuration
[HKLM\SYSTEM\CurrentControlSet\Services\NetBT\P
arameters]
SMBDeviceEnabled=dword:00000000
Native SMB over TCP/IP may be enabled at the
same time as NetBIOS over TCP/IP.
The kit contains a registry file ( port445.reg) which
can be used to disable the Windows file server on
port 445.
<Win32NetBIOS name=...
accept=... lana=n api=.../>
<WINS>
<primary>...</primary>
<secondary>...</secondary>
</WINS>
<hostAnnounce interval='n'/>
Host Configuration
interval in minutes.
<hostAnnounce interval=5/>
<HostAnnouncerPort>
n
</HostAnnouncerPort>
<sessionTimeout>
n
</sessionTimeout>
The SMB server has many debug settings which are controlled by the following
configuration items:-
<netbiosDebug/>
<announceDebug/>
10
The following table lists the available session debug levels:Session Debug Levels
NETBIOS
STATE
RXDATA
TXDATA
ERROR
Request errors
NEGOTIATE
TREE
Share connection/disconnection
SEARCH
File/directory searches
INFO
Information requests
FILE
File access
FILEIO
File read/write
TRANSACT
SMB transactions
ECHO
IPC
PKTTYPE
DCERPC
DCE/RPC handling
NOTIFY
STREAMS
NTFS streams
SOCKET
LOCK
STATECACHE
TIMING
Request/response timing
PKTPOOL
PKTSTATS
THREADPOOL
Thread pool
BENCHMARK
Benchmarking
STATECACHE
OPLOCK
Oplocks
<netBIOSSMB/>
<hostAnnounce interval="5"/>
</host>
<sessionDebug flags="Negotiate,Tree"/>
<netbiosDebug/>
<announceDebug/>
</SMB>
Cluster Configuration
<configFile>
</configFile>
<bindto>n.n.n.n</bindto>
<bindto adapter=.../>
Specifies the port that the FTP server listens for incoming
connections on. The default port is 21.
<rootDirectory>
..
</rootDirectory>
12
FTP Configuration
path format, using forward slashes in the path '/'.
The root directory path may specify just the virtual
filesystem to be used as the root, ie. /name, or may
contain one or more sub-directories on the particular virtual
filesystem, ie. /name/dir1/dir2.
<dataPorts rangeFrom=n
rangeTo=n/>
<allowAnonymous/>
<debug flags=.../>
<siteInterface>
<class>..</class>
..
</siteInterface>
<keyStore>
</keyStore>
<trustStore>
</trustStore>
<storePassphrase>
</storePassphrase>
Store passphrase
<requireSecureSession/>
<sslEngineDebug/>
The following table lists the available FTP debug levels:FTP Debug Levels
STATE
RXDATA
TXDATA
SEARCH
File/directory searches
INFO
Information requests
FILE
File access
FILEIO
File read/write
ERROR
Request errors
PKTTYPE
Request types
DATAPORT
Data session
DIRECTORY
13
Request/response timing
SSL
FTPS/SSL
14
<MountServerPort>
n
</MountServerPort>
</PortMapperPort>
If not specified the default port of 111 will be used.
<NFSServerPort>
n
Specifies the port to be used by the NFS server for UDP and
TCP requests.
</NFSServerPort>
If not specified the default port of 2049 will be used.
<PacketPool>
n
</PacketPool>
<ThreadPool>
n
</ThreadPool>
<debug flags=.../>
<mountServerDebug/>
<portMapperDebug/>
<rpcAuthenticator>
<class>...</class>
</rpcAuthenticator>
<disablePortMapperRegistrat Do not register the NFS and mount servers with a port
ion/>
mapper service.
<FileCache>n[:m]</FileCach File cache timer value(s) in seconds. Specifies the amount
e>
of time to keep a file open after an I/O or close request is
15
NFS Configuration
received.
If only a single value is specified it will be used for file I/O
and file close timers.
Two values may be specified, seperated by a ':'. The first
value is the I/O timer and the second value is the file close
timer, in seconds.
<fileCacheDebug/>
The following table lists the available NFS debug levels:NFS Debug Levels
RXDATA
TXDATA
SEARCH
File/directory searches
INFO
Information requests
FILE
File access
FILEIO
File read/write
ERROR
Request errors
DIRECTORY
16
JavaFileDiskDriver
Maps the virtual filesystem to the local filesystem using the java.io.File
class.
DBDiskDriver
Uses a database to hold the virtual filesystem structure. The database
interface used is configurable to allow different database types to be
used. The file data is accessed via a file loader class with different
implementations allowing the file data to be stored on the local
filesystem, in database BLOB fields or in a repository.
Shares Configuration
<diskshare name=...
comment=.../>
<driver>
<accessControl>
<accessControl default=...>
The default attribute specifies the default access for
clients that do not match any of the access control rules.
The default value may be Read for read-only access, Write
for read/write access or None for no access.
An empty access control block may be specified with a
default value or Read or Write.
<disableChangeNotification/>
<size totalSize=n
freeSize=n/>
The disk size and free space may be specified as 'n' bytes,
'nK' for kilobytes, 'nM' for megabytes or 'nT' for terabytes.
17
Shares Configuration
The blockSize defaults to 512 bytes and the blocksPerUnit
defaults to 64 to indicate a 32Kb allocation unit. It is
recommended that these values are not altered.
The virtual filesystem driver class may implement the
DiskSizeInterface to provide dynamic disk size
information.
<volume label=... serial=n
created=d/>
The <driver> sub-section contains the virtual filesystem driver class details and driver
specific configuration values. The <driver> section must contain a <class>...</class>
item to specify the driver class, for example:<class>org.alfresco.jlan.smb.server.disk.JavaFileDiskDriver</class>
The <accessControl> sub-section contains the access control rules that are used to
allow read or read/write access to the share, or to disallow access to the share.
The <accessControl> block may be empty if a default access of Read or Write is
specified, for example :<accessControl default=Read/>
The following table details the access control rules that are available via the default
access control manager. The access attribute may have the value Read for read-only
access, Write for read/write access or None to disallow access.
Description
18
Description
subnet in n.n.n.n format.
The mask attribute specifies the network
mask in n.n.n.n format.
19
20
Interface Class
MySQL
org.alfresco.jlan.server.filesys.db.mysql.MySQLDBInterface
Oracle
org.alfresco.jlan.server.filesys.db.oracle.OracleDBInterface
Derby
org.alfresco.jlan.server.filesys.db.derby.DerbyDBInterface
The DBDiskDriver uses a seperate interface to load and save the file data, a file
loader. The file loader implementation may allow direct access to the file data or may
use a thread pool of worker threads to load/save the file data from a repository.
The following file loaders are included in the JLAN Server kit :Name
Description
SimpleFileLoader
DBFileLoader
The DBDiskDriver can use the clustered file state cache to allow multiple JLAN Servers
to operate as a cluster, where file locks, access mode checks and updates are
implemented between the cluster members.
The following table lists the main DBDiskDriver configuration sections :DBDiskDriver Configuration
<DatabaseInterface>
..
</DatabaseInterface>
<FileLoader>..</FileLoader>
<disableNTFSStreams/>
<enableTrashCan/>
DBDiskDriver Configuration
rather than deleting them from the database.
<QuotaManagement/>
<RetentionPeriod>
...
</RetentionPeriod>
<disableOplocks/>
<stateCache type=...>
</stateCache>
<RetentionPeriod>7</RetentionPeriod>
The standalone state cache has the following configuration values :Standalone State Cache Configuration
<fileStateExpire>
n
</fileStateExpire>
<cacheCheckInterval>
n
</cacheCheckInterval>
<Debug/>
<expiryDebug/>
<initialSize>
n
</initialSize>
22
The clustered state cache has the following configuration values :Clustered State Cache Configuration
<fileStateExpire>
n
</fileStateExpire>
<cacheCheckInterval>
n
</cacheCheckInterval>
<clusterName>
</clusterName>
<clusterTopic>
</clusterTopic>
<nearCache disable/>
<nearCache timeout=n/>
The following table lists the available clustered file state cache debug levels :Clustered File State Cache Debug Levels
STATECACHE
Cache get/put/find
EXPIRE
Cache expiry
NEARCACHE
OPLOCK
Oplock grant/release
BYTELOCK
FILEACCESS
MEMBERSHIP
CLEANUP
PERNODE
CLUSTERENTRY
CLUSTERMESSAGE
Cluster messaging
REMOTETASK
Remote tasks
REMOTETIMING
RENAME
Rename state
FILEDATAUPDATE
FILESTATUS
24
<UserName>...</UserName>
<Password>...</Password>
<ConnectionPool>
...
</ConnectionPool>
<Debug/>
<SQLDebug/>
<FileSystemTable>
...
</FileSystemTable>
<StreamsTable>
...
</StreamsTable>
<RetentionTable>
...
</RetentionTable>
<QueueTable>
...
</QueueTable>
<TransactionQueueTable>
...
</TransactionQueueTable>
<DataTable>
...
</DataTable>
<JarDataTable>
...
</JarDataTable>
Name of the database table that holds the Jar file data
containing multiple small files.
25
<RootPath>..</RootPath>
<Debug/>
<FragmentSize>
n
</FragmentSize>
<ThreadPoolSize>
l[:s]
</ThreadPoolSize>
26
JDBCFileLoader Configuration
<load_threads>:<save_threads>.
The default number of worker threads is 4.
<TempDirectory>
..
</TempDirectory>
<MaximumFilesPerDirectory>
n
</MaximumFilesPerDirectory>
Specifies the number of temporary files to store per subdirectory within the temporary file cache area. This is to
prevent performance problems when a directory contains
several thousand files.
<MemoryQueueSize>
n
</MemoryQueueSize>
<QueueLowWaterMark>
n
</QueueLowWaterMark>
<SmallFileSize>
n
</SmallFileSize>
<FilesPerJar>
n
</FilesPerJar>
Specifies the maximum file size for the Jar file when Jar
packing is enabled. The size may be specified as 'n' for
bytes, 'nK' for kilobytes or 'nM' for megabytes.
The FilesPerJar setting may also be specified with the
SizePerJar setting.
The default value is 200K.
<JarCompressionLevel>
n
</JarCompressionLevel>
27
JDBCFileLoader Configuration
The default value is 0 (no compression).
<KeepJars/>
<Debug/>
28
The following sample configuration uses a mySQL database to hold the filesystem
structure, load/save queues and file data. The file data is stored using BLOB fields.
The configuration enables the packing of small files into Jar files which are then stored
as a single file within the database.
When files are opened the file data will be copied to temporary cache files in the
N:\msqltemp\ directory.
<diskshare name="MySQLBlob" comment="MySQL virtual filesystem">
<driver>
<class>org.alfresco.jlan.server.filesys.db.DBDiskDriver</class>
<CacheTime>300</CacheTime>
<DatabaseInterface>
<class>org.alfresco.jlan.server.filesys.db.mysql.MySQLDBInterface</class>
<DSN>jdbc:mysql://linuxsrv/JLANNew</DSN>
<Username>dbuser</Username>
<Password>dbpassword</Password>
29
<ConnectionPool>10:20</ConnectionPool>
<FileSystemTable>filesys</FileSystemTable>
<StreamsTable>filestrm</StreamsTable>
</DatabaseInterface>
<FileLoader>
<class>org.alfresco.jlan.server.filesys.db.DBFileLoader</class>
<ThreadPoolSize>6:2</ThreadPoolSize>
<TempDirectory>N:\mysqlcTemp\</TempDirectory>
<MaximumFilesPerDirectory>1000</MaximumFilesPerDirectory>
<SmallFileSize>100K</SmallFileSize>
<FilesPerJar>500</FilesPerJar>
<SizePerJar>1000K</SizePerJar>
<JarCompressionLevel>9</JarCompressionLevel>
</FileLoader>
</driver>
</diskshare>
The following sample configuration uses an Oracle database to hold the filesystem
structure, load/save queues and file data. The file data is stored using BLOB fields.
When files are opened the file data will be copied to temporary cache files in the
N:\oracleTemp\ directory.
A retention period of seven days will be applied to files/folders created on the
filesystem to prevent them from being deleted or modified during the retention
period.
The background load/save thread pool will allocate six thread for file loading and two
threads for file saving.
<diskshare name="OracleBlob" comment="Oracle virtual filesystem using BLOB">
<driver>
<class>org.alfresco.jlan.server.filesys.db.DBDiskDriver</class>
<CacheTime>30</CacheTime>
<RetentionPeriod>7</RetentionPeriod>
<DatabaseInterface>
<class>org.alfresco.jlan.server.filesys.db.oracle.OracleDBInterface</clas
s>
<DSN>jdbc:oracle:thin:@WIN2000DB:1521:JLAN</DSN>
<Username>dbuser</Username>
<Password>dbpassword</Password>
<ConnectionPool>10:20</ConnectionPool>
</DatabaseInterface>
30
<FileLoader>
<class>org.alfresco.jlan.server.filesys.db.DBFileLoader</class>
<ThreadPoolSize>6:2</ThreadPoolSize>
<TempDirectory>N:\oracleTemp\</TempDirectory>
<MaximumFilesPerDirectory>1000</MaximumFilesPerDirectory>
</FileLoader>
</driver>
</diskshare>
31
<SmallFileSize>100K</SmallFileSize>
<FilesPerJar>500</FilesPerJar>
<SizePerJar>1000K</SizePerJar>
<JarCompressionLevel>9</JarCompressionLevel>
</FileLoader>
<stateCache type=cluster>
<clusterName>MySQLCluster</clusterName>
<clusterTopic>MySQLTopic</clusterTopic>
<nearCache timeout=10/>
<cacheDebug flags=Expire,FileAccess/>
</stateCache>
</driver>
</diskshare>
32
org.alfresco.jlan.jlansrv.LocalAuthenticator
Uses user accounts defined in the configuration file to provide protected
access to the virtual filesystems.
org.alfresco.jlan.jlansrv.PassthruAuthenticator
Uses a domain controller or other server to authenticate users
connecting to the JLAN Server.
Security Configuration
<authenticator>
<accessControlManager>
<globalAccessControl>
<mode>..</mode>
Specifies the security mode for the SMB server. Valid values
are USER or SHARE.
33
Authenticator Configuration
<allowGuest/>
<name>value</name>
or
<name/>
<debug/>
<rule>...</rule>
2.4.8.1 LocalAuthenticator
The org.alfresco.jlan.server.auth.LocalAuthenticator Authenticator implementation
uses a list of users defined in the configuration file to control access to the JLAN
34
Users Configuration
<user name=..>
<password>..</password>
<realname>..</realname>
<comment>..</comment>
<administrator/>
<home>..</home>
35
<password>45gHjwm</password>
<realname>Administrator</realname>
<administrator/>
</user>
</users>
</security>
2.4.8.2 PassthruAuthenticator
The org.alfresco.jlan.server.auth.passthru.PassthruAuthenticator Authenticator
implementation uses a domain controller or other network server to authenticate the
user connecting to the JLAN Server virtual filesystems.
Passthru Authenticator
<class>...</class>
<mode>...</mode>
<Domain>...</Domain>
<Server>...</Server>
<protocolOrder>
</protocolOrder>
<offlineCheckInterval>
</offlineCheckInterval>
<Timeout>
</Timeout>
36
<authenticator>
<class>
org.alfresco.jlan.server.auth.passthru.PassthruAuthenticator
</class>
<mode>USER</mode>
<Domain>STARLASOFT</Domain>
</authenticator>
</security>
<mode>...</mode>
<KDC>...</KDC>
<Realm>...</Realm>
Kerberos realm.
<Password>...</Password>
<LoginEntry>...</LoginEntry>
<disallowNTLMV1/>
<kerberosDebug/>
37
</authenticator>
</security>
See the Enterprise Authentication Setup section for more details on how to
configure an Active Directory account for use by the JLAN CIFS Server.
<debug/>
<name>value</name>
or
<name/>
38
DriveMappings Configuration
The interactive parameter specifies whether a dialog is
displayed to prompt for a username and password if the
default or supplied credentials cannot logon to the JLAN
Server.
The prompt parameter specifies that the
username/password dialog is displayed before the
connection attempt is made.
Output Configuration
<class>..</class>
<name>value</name>
or
<name/>
Output Configuration
The org.alfresco.jlan.debug.JDKLoggingDebug class has a
<Properties>..</Properties> paramter to specify the JDK
logging properties file.
<debugTopic>
</debugTopic>
<receiveOnly/>
Specifies that this is the node that will log debug messages
from all other nodes in the cluster.
This node will not broadcast debug output to the cluster.
<localOutput>
40
A sample cluster debug configuration section is shown below, sending local output to
the console, and acting as the central debug logger for the cluster:<debug>
<output>
<class>org.alfresco.jlan.debug.cluster.ClusterDebug</class>
<debugTopic>AlfrescoJLANDebug</debugTopic>
<receiveOnly/>
<localOutput>
<class>org.alfresco.jlan.debug.LogFileDebug</class>
<logFile>jlansrv.log</logFile>
<append/>
</localOutput>
</output>
</debug>
41
Native SMB/CIFS is enabled by default. Changing the value to zero and rebooting the
system will disable native SMB/CIFS support.
The native SMB/CIFS service is designed to use DNS to lookup host names.
42
Windows does not bind NetBIOS over TCP/IP to the localhost/127.0.0.1 address.
The JLAN Server native SMB/CIFS session handler may also be bound to a particular
network address :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<tcpipSMB/>
<bindto>192.168.1.2</bindto>
43
</host>
</SMB>
The above configuration will bind globally to all available network adapters. The
network adapter that the NetBIOS over TCP/IP handler binds to can also be
specified :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<netBIOSSMB/>
<broadcast>192.168.1.255</broadcast>
<bindto>192.168.1.2</bindto>
</host>
</SMB>
To have the JLAN Server appear under Network Neighborhood the host announcer
must be enabled :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<netBIOSSMB/>
<broadcast>192.168.1.255</broadcast>
<bindto>192.168.1.2</bindto>
<hostAnnounce interval=5/>
</host>
</SMB>
To use the JLAN Server to provide virtual filesystems to the localhost only you can
bind the JLAN Server to the localhost/127.0.0.1 address :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<netBIOSSMB bindto=127.0.0.1/>
<broadcast>192.168.1.255</broadcast>
<bindto>127.0.0.1</bindto>
</host>
</SMB>
Enabling the host announcer in this configuration has no effect, instead an entry
should be added to the local LMHOSTS file in the <Windows>\system32\drivers\etc
directory.
44
The localhost/127.0.0.1 configuration does not work under WinXP SP2 due to security
changes introduced by Microsoft. See the Win32 NetBIOS solution below.
If your network is configured to use WINS for NetBIOS naming use the following
configuration :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<netBIOSSMB/>
<broadcast>192.168.1.255</broadcast>
<WINS>
<primary>192.168.1.10</primary>
</WINS>
</host>
</SMB>
If there are multiple network adapters in the server system you may need to specify
the NetBIOS logical adapter, known as a LANA.The easiest way to determine the
available LANAs is to enable the 'Socket' debug level using the <sessionDebug
flags=.../> setting within the <SMB> configuration section, this will dump out a list
of the available LANAs.
The following configuration section shows how to use a particular LANA for the Win32
NetBIOS interface :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<Win32NetBIOS lana=6/>
</host>
</SMB>
To configure the Win32 NetBIOS interface so that the JLAN Server is only accessible to
a particular host the accept configuration attribute is used :<SMB>
<host name=JLANSRV domain=ALFRESCO>
<Win32NetBIOS accept=MYPC/>
</host>
</SMB>
With the above configuration the JLAN Server Win32 NetBIOS interface will only
accept connections from the host with a NetBIOS name of MYPC, this could be the
localhost or a network host.
To have the JLAN Server appear under Network Neighborhood when using the Win32
NetBIOS interface use the following configuration settings :45
<SMB>
<host name=JLANSRV domain=ALFRESCO>
<Win32NetBIOS/>
<Win32Announce interval=5/>
</host>
</SMB>
46
3. Create the Service Principal Names (SPN) for the JLAN Server CIFS server using the
setspn utility. The setspn utility is a free download from the Microsoft site, and is also
part of the Win2003 Resource Kit.
setspn -a cifs/<cifs-server-name> jlanservercifs
setspn -a cifs/<cifs-server-name>.<domain> jlanservercifs
You can list the SPNs for an account using :setspn -l jlanservercifs
<cifs-server-name> is the NetBIOS name of the Alfresco CIFS server when running on
47
an Active Directory client or the host name for a client that is not an Active Directory
client, ie. not logged onto the domain.
Some versions of the ktpass command will add the SPN for the principal so you may
only need to add the NetBIOS/short name versions of the SPNs. Use the setspn -l
<account-name> command to check if the ktpass command set the SPN.
4. Copy the cifs.keytab file to the server where the JLAN Server will run. Copy the
file to a protected are such as C:\etc\ or /etc.
5. Setup the Kerberos ini file on the server that the JLAN Server will run, the
default location is C:\winnt\krb5.ini or /etc/krb5.conf. A sample krb5.ini is
shown below.
[libdefaults]
default-realm = ALFRESCO.ORG
[realms]
ALFRESCO.ORG = {
kdc = adsrv.alfresco.org
admin-server = adsrv.alfresco.org
}
[domain-realm]
adsrv.alfresco.org = ALFRESCO.ORG
.adsrv.alfresco.org = ALFRESCO.ORG
Note: The realm should be specified in uppercase.
6. Setup the Java login configuration file. This would usually be in the
JRE\lib\security folder. Create a file named jlan.login.config with the following
entry :JLANServerCIFS {
com.sun.security.auth.module.Krb5LoginModule required
storeKey=true
useKeyTab=true
keytab=C:/etc/cifs.keytab
principal=cifs/<jlan-server-name>.<domain>;
};
7. Enable the login config file in the main Java security configuration file, usually
at JRE\lib\security\java.security. Add the following line :login.config.url.1=file:${java.home}/lib/security/jlan.login.config
8. Configure the JLAN CIFS server to use the Enterprise authenticator with
Kerberos enabled :<authenticator>
<class>
org.alfresco.jlan.server.auth.EnterpriseCifsAuthenticator
</class>
<mode>USER</mode>
<allowGuest/>
<Debug/>
<KDC>adsrv.starlasoft.co.uk</KDC>
<Realm>STARLASOFT.CO.UK</Realm>
<Password>...</Password>
<Principal>cifs/<cifs-server-name>.<domain></Principal>
</authenticator>
48
49