Table of Contents
LNACLs is the small console utility for editing ACL (access control list) of Lotus Notes/Domino databases. It provides you command line interface (CLI) like XCACLs from NT Resource Kit, if you know. The first and the main goal of LNACLs is the fast batch processing of multiple databases.
Example 1: disable access for group "NoAccess" to all databases.
lnacls.exe *.nsf =NoAccess:Group:NoAccess:
Example 2: allow access for Domino admins group to all mail databases.
lnacls.exe mail\*.nsf +LocalDomainAdministrators:PGroup:Manager
This saves your time and is more reliable than multiple mouse clicking!
More once goal is a blackbox unlocking on non-Windows servers. Currently we don't have Notes desktop on Unix-powered servers. So, we cannot (well, I don't know how) change ACL of database created or replicated to Unix server with incorrect ACL that don't allows us to control them from another host using Administration Client. But this can be done by LNACLs executed on server host, as shown in examples above.
Currently supported platforms are Win32 and Linux. Ports to other platforms are ease and welcome.
I'm not jurisprudence expert. Dmitry Sklyarov's experience prevents me from visiting USA and from contacts with the Great American Justice. I distribute my own software under terms of GNU GPL (GNU General Public License) and hope to gain no problems in future: from Lotus, from Microsoft, from FBI, from GazProm+KGB (killers of independent russian TV), from manufacturer of my mouse (I prefer Genius) or from somebody else. In short, I understand rules of GNU GPL as following:
lnacls [:server] filenames.. [ACL.. [filenames.. [ACL..]]]
First, arguments containing spaces should be quoted by "". Second, «lnacls | more» gives you upmost detailed instruction.
Filenames:
When there are no ACL in command line, current ACL will be displayed.
ACL format:
[!]{+|-|=}[UserName]:[UserType]:[Level]:[Modifiers]:[Roles]
First ACL character:
Username:
Other parts, when missing, are treated as “this part is still unchanged”.
UserType:
Level:
Modifiers:
Multiple modifiers and roles are separated by "+", for example: cd+dd.
Environment variables:
Dump ACL of main Notes address book or Domino Directory database:
lnacls names
Create new entry or add attributes to existing NotesSrv entry:
lnacls names +NotesSrv/UCVT/RU:server:author:cpa+cpf:GroupCreator
Replace existing MyServers entry (old attributes are lost) or create new:
lnacls names =MyServers:sgroup:edi::UserCreator+UserModifier
Remove attributes from existing entry:
lnacls names -NotesSrv/UCVT/RU:::cpf:UserCreator
Completely remove existing Serv1 entry from NAB and LOG databases, add new Serv2 entry to both, then dump resulting ACL's:
lnacls names log -Serv1/UCVT/RU +Serv2/UCVT/RU:serv:reader names log
Consider following installation paths:
Using M$ Visual C++:
cl.exe /MD /IC:\Lotus\NotesAPI\Include lnacls.c C:\Lotus\NotesAPI\Lib\MSWin32\notes.lib
Using Borland C++ (tested with v5.5, freely available from www.borland.com):
implib nnotes_bc.lib c:\lotus\notes\nnotes.dll
bcc32.exe -IC:\Lotus\NotesAPI\Include lnacls.c
For running lnacls.exe, C:\Lotus\Notes\nnotes.dll and NOTES.INI should be in the current directory or should be visible through PATH environment variable. Under Windows'95/98/ME, add following line to end of your C:\Autoexec.bat and reboot:
set PATH=C:\Lotus\Notes;%PATH%
Better way: place lnacls.exe directly to C:\Lotus\Notes directory.
This is important under old Windows'95 (build 4.00.950) for running VisualC++-based version only: check that msvcrt.dll (Micro$oft Visual C Run-Time Library) actually exists in C:\WINDOWS\System directory.
Consider following installation paths:
Step 1. Create temporary directory and unzip lnacls_src.zip to him:
mkdir -p ~/src/lnacls cd ~/src/lnacls unzip /where/you/place/lnacls_src.zip chmod +x nloader
Step 2. Edit ~/src/lnacls/nloader file: change "DOMPATH=" (path to binary files where is libnotes.so) and "NOTES_INI=" (full pathname of notes.ini) lines to proper values. nloader is the simple bash script for starting standalone Notes apps in correct environment.
Step 3. Edit linux.mak: change "LOTUS=" and "NOTESAPI=" lines to proper values.
Step 4. Run make:
make -f linux.mak TARGET=lnacls make -f linux.mak TARGET=lnerror
Run it! For example:
./nloader ./lnacls log.nsf +LocalDomainAdministrators:PGroup:Manager ./nloader ./lnerror 0x1A5 421
Support of KOI8-R for russian users is provided when LC_CTYPE environment variable contains "ru_RU.KOI8-R" value only.