Attention!
This site is closed because I leaving UCVT!
My personal site will be soon here:	Âíèìàíèå!
Ýòîò ñàéò çàêðûò â ñâÿçè ñ ìîèì óõîäîì èç ÓÖÂÒ.
ß ñîáèðàþñü ñîçäàòü íîâûé ñàéò çäåñü:	

www.ilya-evseev.narod.ru

 . . . .Automated Notes R5 initialization
.

1. News

28 Feb 2002 - version 0.1.
6 Jul 2002 - english documentation.
9 Sep 2002 - version 0.3. Bugfixes:
* workaround missing TEMP environment variable;
* more accurately diagnostic output;
* don't fail on missing template databases.

2. Disclaimer

Init5 utility is written by me, Ilya Evseev, senior sysadmin of UCVT (Educational Centre of Computing Science), SPb, Russia~

Project homepage: http://www.evseev.ucvt.ru/e.nsf/AllDocs/init5e

Distribution terms: GNU GPL, "as is", without any warranty.

Download file init5.zip (21k):

2. Purpose

Install and initialize Lotus Notes R5 workstation by single click.
Support multiple Notes users on the one workstation.
Support one Notes user from multiple workstations (in the same LAN, i.e.: with the same Domino server).

3. Requirements for workstation

Windows'95 or later (98/ME,...).
Microsoft Network
TCP/IP
VBScript language interpreter (builtin to Windows'98 or later,
may be downloaded from http://msdn.microsoft.com/scripting otherwise)

4. Installation: shared folders on the server

Domino server launching Domino Directory (Public Address Book) and personal mailboxes must be present.
File-server must be present with following shares:
With the Init5 files, for example: \\NotesSrv\Scripts.
Network permissions: Read-Only.
With the Notes distribution, for example: \\NotesSrv\NDistrib.
Network permissions: Read-Only.
With personal folders, for example: \\NotesSrv\DomUsers.
Permissions: Network = Full, File system ACL's = Read + ChDir.

These resources may be distributed between separate servers (up to 4), but we use single server for all them. ;)

5. Theory: files on the workstation

User files are logically separated to 3 parts:
ID-file
personal databases (PNAB, PerWeb, BookMark, Headline, Journal, ...) and Desktop5.dsk
NOTES.INI and Windows shortcut for running Notes.

My initialization utility places these files to destination folders in one of 4 modes using following scheme:

Mode	Personal databases
and desktop5.dsk	NOTES.INI
and Windows shortcut	Personal ID-file	
Local	personal folder on the workstation	personal folder on the workstation	personal folder on the workstation	
ID/shared local	in the Notes data directory,
common for all users
on this workstation	personal folder on the workstation	personal folder on the workstation	
Shared local	in the Notes data directory,
common for all users
on this workstation	personal folder on the workstation	personal folder on the server	
Full network	personal folder on the server	personal folder on the server	personal folder on the server	

Personal folder on the workstation = D:\Notes\Data\Users\user_name. Created by Init5 if not exist.
Personal folder on the fileserver = N:\user_name, where N: is network drive, mapped to \\NotesSrv\DomUsers. This folder must be already exist. For example, network personal folder may be created manually by sysadmin when new person is registered, for storing generated USER.ID (see below). Set proper filesystem ACL's, etc.

USER.ID file (created by Notes when new user registered) must be already exist before starting Init5
and must be placed to destination folder.
All other files are created from templates/provisions, if need.
Already existing files are correctly (I hope!) upgraded.

All modes are not interlaced, and may be used on the same workstation independently in any combination.

6. What is shared mode?

In the shared mode all users on the given workstation use the same set of personal databases. These databases are stored with "shared_"-prefixed filenames, for example, Personal Address Book (PNAB) is stored in "D:\Notes\Data\shared_names.nsf" file. Shared PNAB contains one "Connection" document for appropriated Domino server + set of "Location" documents for each user on this workstation. Each user have it's own subfolder that contains:
NOTES.INI with "Location=" setting that points to appropriate "Location" document in PNAB,
Windows shortcut for running Notes with this NOTES.INI.
So, multiple users use the same PNAB without conflicts.

Disadvantages of shared mode:
Workspace in shared_desktop5.dsk contains icons of all personal mailboxes.
Of course, only icons are visible for everybody, and mailboxes are accessible by owners only.
Unless Connections and Locations, PNAB stores personal certificates, contacts and other information. All documents in shared_names are available for all users for reading and writing (if document is not encrypted by owner). But owner don't have access to these documents from other workstations. This is true for all shared_* files.

Shared mode is preferable, when many users:
use Notes from little set of workstations;
don't use personal databases enough intensively for making fully separated sets of personal databases for each user.

For example, in educational Centre teachers are such users. In the main office teachers use Full_network workplaces, in peripheral offices - Shared_local workplaces. Of course, before running Init5 on the workstation in peripheral network we need to prepare following steps on the peripheral Domino/File-server:
create replica of personal mailbox from central server on the peripheral server;
create personal folders in \\NotesSrv\DomUsers;
copy appropriated ID-files from central server into created folder on the peripheral server.

Advantages of shared mode:
Ease of administration (user knows that workspace has limited features and used by multiple users);
Low disk usage (???oh-h... cannot translate russian phrase).

7. Contents of 'Scripts' folder

\\NotesSrv\Scripts contains following files (scripts, database and text):
init5.vbs
anonymous.id
notes.ini
setup.iss

desktop5.DSK
bookmark.nsf
headline.nsf
names.nsf
perweb.nsf

First four files are in Init5.zip package. Desktop5.dsk and databases are created by you.

init5.vbs -- workplace initialization utility. Described in the next topics.

anonymous.id -- required for upgrading PNAB design from R4 to R5 only. Init5 passes them to NCONVERT.EXE for preventing password checking because password checking is pointless for local database processing. NCONVERT is called when PNAB and Notes.ini are found, and Notes.ini don't contains R5-specific lines. This is UCVT-only needed feature that is unnecessary for other folks. Anonymous.id is created by initialization Notes workstation in "Island" mode.

notes.ini -- template for personal NOTES.INI.
This template is created in three steps:
Take notes.ini after standard initialization;
Some settings are changed using Notes Preferences dialog window and moved to top of NOTES.INI;
Person-specific settings are removed (KeyFilename, Desktop5, NAMES).
Init5 appends all user-specific settings to end of created NOTES.INI.
NB: R4-style Notes.ini, if exists, is completely rewritten by Init5 template! Old settings are lost.

setup.iss -- InstallShield script, described in the next topic.

desktop5.dsk -- created from scratch. Customize your own desktop5.dsk, for example:
create sheets "Common", "Personal", "Help";
place all database icons except personal;
before leaving Notes - stay "Personal" sheet as current.
Init5 creates a desktop5.dsk for concrete user from this provision
and adds icons of personal databases to current sheet.

Databases -- created from scratch from appropriated Notes templates in the Notes data directory.
For replication between multiple servers we use following ACL's:
Default = Reader
LocalDomainServers = Manager
LocalDomainAdmins = Manager
OtherDomainServers = Reader
You may create Notes shortcut from Domino data directory to Scripts directory
for allowing replication provisioned databases between servers.
Provisioned databases of UCVT are edited after creation by following way:
PNAB is sweeped: all LDAP accounts and other stuff are removed;
PNAB: add "Connection" documents for each organization's server
for using NAMES.NSF in all our networks without changes;
Profile of "Personal Web-navigator"-> "Page Minder" sheet-> "Report receiver" field: must be empty.

In the future creation of provisioned databases may be automated like it's using;)).

8. Notes installation on the workstation

Put file SETUP.ISS to \\NotesSrv\Scripts. This is automation script for InstallShield. Using ISS-file is described (with bugs) in "Domino 5 Administration Help" in "Automating workstation installation" topic, and on the www.installshield.com site. Init5.zip contains ready-to-use SETUP.ISS, but you can generate your own:
run SETUP.EXE (Notes installer) with "-r" switch;
pass installation with settings by your choice;
go to Windows folder, look SETUP.ISS and copy them to \\NotesSrv\Scripts.

For automated installation run SETUP.EXE as following (manually/by shortcut/etc.):
\\NotesSrv\NDistrib\setup.exe /s /f1"\\NotesSrv\Scripts\setup.iss" /f2"%TEMP%\setup_r5.log"

9. Initialization of Notes client workspace

What does standard Notes initialization? Passes user through lot of wizard-based installation steps and generates a) personal databases; b) desktop5.dsk; c) NOTES.INI.

Init5 does the same, with following important differences:
don't asks user but uses settings configured by developer (me) and administrator (you?)
checks that Notes is already installed and installs it if not (see previous topic);
stores created personal files to configuration-specific folder (see topic #5) instead of local data directory;
creates "Connection"/"Location" docs in PNAB;
puts Windows shortcuts for running Notes to Windows desktop and to personal folder.
Actually Init5.vbs replaces standard initialization routine by Lotus. Some limitations are off, for example, Init5 don't checks that Domino server is mail server for this user. So, you can provide multiple workplaces for one user in different networks. Of course, personal mailbox must be replicated to destination network, and ID-file copied before running Init5.

As you can see, Init5 is written on the M$ VBScript, i.e., all sources are freely available for analyzing and improvements.

Init5 provides a lot of additional command line parameters for redeclaring default settings. Init5 folder on the each Domino server of UCVT contains a Windows shortcut named "go!" for running from workstations. For example, Init5 may be called by "go!" shortcut as following:
\\espace\scripts\INIT5.VBS NetworkPath=\\espace\users DominoServer=ESpace/UCVT/RU IPAddr=10.10.2.110 ScriptPath=\\espace\scripts DistribPath=\\espace\rusnotes
What is required from user? Running of \\ESpace\Scripts\go!, if this is the first Notes session on this workstation for him. Sysadmin is not required for this ;)

10. Init5.vbs command line switches

Install={ Program | Local | LShared | Shared | Network }
Select initialization mode
Program = install Notes program/data and stop. Don't initialize user workspace
Local = put all personal files to d:\notes\data\users\username
LShared = ID/local shared: put user.id+notes.ini+lnk to d:\notes\data\users\username, databases - d:\notes\data\shared_*
Shared = local shared: put notes.ini+lnk to d:\notes\data\users\username, databases - d:\notes\data\shared_*, user.id - on the fileserver
Network = all personal files in N:\username on the fileserver
Default = Network.
NetworkPath=UNC
Full path to network share where personal directories are besided. Init5 maps this share to network drive letter, usually N:.
Default = "\\NotesSrv\DomUsers".
DistribPath=UNC
Full path of directory where distribution package of Lotus Notes client program is stored.
Default = "\\NotesSrv\RusNotes".
IPAddr=ip.addr.com
IP-address or DNS-name of Domino server. Used for creation a "Connection" document. By default is calculated using following scheme: detect DNS domain of self using "ping localhost", then prefix it by "notessrv".
Example: evseev.spb05.ucvt.ru -> .spb05.ucvt.ru -> notessrv.spb05.ucvt.ru.
DominoServer=Server/OrgUnit/Org/Country
Name of Domino server where to find personal mailbox.
Init5 stores name of this server to Location document as your mail server.
By default is calculated from IP-address of server: points are replaced to slashes.
Example: notessrv.spb05.ucvt.ru -> NOTESSRV/SPB05/UCVT/RU.
Note: here is used standard UCVT condition for naming Domino servers and IP hosts.
ESpace/UCVT/RU is exception because this is the first Domino server we install ;)))
ScriptPath=UNC
Full path to directory where Init5 looks ISS file, provisioned databases, Notes.ini and Desktop5.dsk file.
Default = "\\NotesSrv\Scripts".
UserLogin=user_login
Used for building name of personal folder on the fileserver and in D:\Notes\Data\Users.
By default: taken from registry.
DirName=dir_name
Name of personal folder on the fileserver and in \Notes\Data\Users.
By default is copied from UserLogin, i.e., this is equal to your Microsoft network login.
Note: this parameter is required because many users are funs of short logins like "john" or "linus",
but personal folders are named by sysadmin using informative lastnames like "Smith" or "Torvalds".
LocalDir=dir_path
Fullpath of personal fodler on the local drive.
By default: Notes data folder + "\Users\" + DirName.
Example: "D:\Notes\Data\Users\evseev".
UserDir=dir_path
Fullpath of personal folder on the network drive.
By default: network drive + DirName.
Example: "N:\evseev".
UserName=First M. Last/OrgUnit/Org/Country
Common name of Notes/Domino user. Used for storing in created documents and ACL's.
If not given, detected automatically - Init5 starts Notes with personal NOTES.INI that contains KeyFilename line that points to personal USER.ID, then calls UserName property of NotesSession instance.
If given, then init5.vbs don't starts Notes, but "attaches" to already running instance and performs all actions for given user instead of user taken from NotesSession.UserName. This feature is userful for initializing shared workspace on single workstation for multiple users:
start init5.vbs mode=shared "UserName=John T. Ripper/UCVT/RU"
start /wait init5.vbs mode=shared "UserName=Joodie V. AllReady/UCVT/RU"
start /wait init5.vbs mode=shared "UserName=...
 ....
First command installs Notes, creates shared personal databases and, personally for John The Ripper, Location document, NOTES.INI and Windows shortcut. After performing this action, Notes still running. Next calls of Init5 are executed quickly because Notes is already running, password is already passed, some checks are skipped etc.
WinLnk={ yes | no | ask }
Create personal shortcut for running Notes by this user on the Windows desktop.
Default: NO.
Note: shortcut in personal folder is created anyway.
EndMsg={ yes | no }
Show final message after Init5 successful finished.
Default: yes.
Debug=nnn
Set detalization level for debugging output to screen and to file. -1 = fatal errors only, 0 = +ordinal errors, 1 = +warnings, 2 = +notifications, 3 = +information. Levels greather than 3 are used for debugging, max = 100.
By default is configured for screen and for file separately.
FileDebug=nnn
Detalization level for output to %TEMP%\init5.log.
Default = 100, i.e., maximum detaility.
MsgDebug=nnn
Detalization level for output to screen using MessageBox.
Default = 0, i.e., errors only.

11. Init5.vbs constans

These parameters are not configurable because they are fixed inside UCVT.
So, they are declared as constants at top of Init5.vbs now:

BinPath = D:\Notes
Where to find Lotus Notes program. Must be the same as szDir in SETUP.ISS.
DataPath = D:\Notes\Data
Where to find Lotus Notes data folder. Must be the same as szDir1 in SETUP.ISS.
UserDrive = "N:"
Network drive used for mapping of "\\NotesSrv\DomUsers".
LanPortName = "TCPIP"
Notes network port for connecting with Domino server. Must be present in NOTES.INI provision too.

12. Permissions to personal files on the network drive. setperms.sh è setperms.bat

Init5 archive contains two scripts: setperms.bat è setperms.sh for running under WindowsNT and Linux. These scripts are used for configuring ACLs of personal folders in the shared folder DomUsers. NT script uses xcacls.exe utility from NT Resource Kit. Linux script uses RedHat scheme: single user - single group. File user.id0 is created: a) as user.id backup (if dummy user removes ID-file, smart sysadmin restores it); and b) as backdoor used for access to encrypted documents, if user changes password of main ID-file.

13. Bugs & To do's

Todo: Create provisioned personal databases in \\NotesSrv\Scripts folder automatically
Todo: Transform standard workstations (all personal files in local Data directory) to Init5-provided
Todo: Address window of new memo: initially using Public Address Book instead of PNAB.
Bug: Desktop5 is overwrittten by standard Bookmarks "Welcome page" at first workstation running
Todo: Customize proxy settings in Location document.

Created: 23.06.2002 03:35
Last modified: 01.07.2002 14:05
Íà ãëàâíóþ ñòðàíèöó - Main page - E-Mail