NMIS 9.7.0 Installer Changes
This page covers what is new in the NMIS 9.7.0 installer: the options you can pass, the questions it asks, the files it creates, and what happens in what order when you upgrade.
New options
These are key=value arguments and go after the dash options, for example:
sudo ./installer -y adminpw_file=/root/nmis-pw eos=falseadminpw_file=/path/to/file
Supplies the initial nmis administrator password from the first line of a file, instead of
letting the installer generate one. This is the supported way to set the password on an
unattended install.
The path must be absolute and must not be a symbolic link. If the file is missing, empty or unreadable the install stops before anything is copied, rather than quietly generating a password you are not expecting. A file readable by group or others produces a warning and the install continues. Only the first line is read, and the password is never echoed or written to the install log.
The password is deliberately not accepted as a command-line argument, because arguments are
visible to every local user in ps for as long as the install runs. You can also supply it
as NMIS9_ADMIN_PASSWORD or NMIS9_ADMIN_PASSWORD_FILE in the environment, but note that
sudo discards those unless you use sudo -E, so adminpw_file= is the more reliable
form. It can also be given as OPT_ADMINPW_FILE.
On an upgrade this only applies to an account that has no password yet. An existing password,
and a deliberately locked account, are left alone. Use
bin/nmis-cli act=set-htpasswd-password user=nmis to change an existing password.
eos=true|false
Chooses whether encryption of secrets is on. true, t, yes, y and 1 mean on;
false, f, no, n and 0 mean off. Anything else, including eos= with nothing after
it, stops the install rather than guessing which posture you meant.
Without this option the installer does not touch the setting at all: a new installation takes the shipped default, which is on, and an existing installation keeps whatever it has. With the option, it applies on upgrades too and overrides what you have.
Also available as OPT_EOS. See Encryption of Secrets before turning it on, in
particular the part about backing up the master key.
omk_compat_user=true|false
Creates a compatibility account in MongoDB so that a currently shipped OMK product can install its own databases on this host. Those installers have no way of being told a credential and fall back to an account NMIS no longer creates. It applies to opCharts 4.9.3, opEvents 4.6.x, opConfig 4.8.1 and opHA 5.1.4.
The account carries a password published in our documentation. It is created scoped to
the OMK databases only, never as a superuser, with nothing on the NMIS database, and
restricted to connections from the local host. You can remove it afterwards with
bin/nmis-cli act=remove-omk-compat-user, and inspect it with act=check-omk-compat-user.
The default is no. Without the option the installer asks, and an unattended or preseeded
install that does not answer gets no such account. An unrecognised value stops the install.
Also available as OPT_OMK_COMPAT_USER.
If you are installing the September 2026 OMK releases or later, you do not need this.
allow_selinux=1
Skips the interactive SELinux warning, for unattended installs on an SELinux-enforcing host.
Without it, an unattended install on such a host aborts, because the prompt requires the
word CONTINUE to be typed and the unattended default is empty. Also available as
OPT_ALLOW_SELINUX.
New questions
Two new questions appear in an interactive install. Both have preseed tags, so -P picks
them up automatically when generating a preseed file.
Question | When | Default | Preseed tag |
|---|---|---|---|
| Upgrade, only if | Yes |
|
| Fresh install and upgrade, unless | No |
|
eos= and adminpw_file= have no question. They are set by argument or not at all.
A failed MongoDB setup now stops the install
admin/setup_mongodb.pl has always run from the installer. What changed in 9.7.0 is what
happens when it fails. It used to log the return code and carry on, leaving you with an
apparently successful install that could not reach its database. Now the install stops,
and the installer explains the exit code rather than printing a raw number. Connection
failures in particular are called out as connection failures, because the credential prompts
that appear above them make a connection problem look like an authentication problem.
You can still decline to run it. The hook asks Do you want to run the MongoDB setup helper
now? (preseed tag 473b, default yes), and answering no lets the install finish, with a
message that NMIS cannot authenticate to MongoDB until the helper has been run as root. Only
a failed run stops the install.
-m FALSE does not skip this step. That option controls whether the installer installs
or upgrades the MongoDB server package and repository. The setup helper, which provisions
the database accounts and writes the credentials, runs either way.
If your MongoDB is on another host, the helper detects that db_server is not local and
warns that setup will fail unless the remote server is running without authentication or
already has an administrative credential it can use. It then waits for you to press Enter,
which an unattended install answers automatically.
What the step does on a fresh install and on an upgrade is described on MongoDB Authentication.
Files a 9.7.0 install creates
Path | Owner and mode | Created when | What it is |
|---|---|---|---|
| root, | Always | Directory for material that must not live in the configuration tree. The mode lets the web server and the NMIS group reach the key inside it without being able to list the directory. |
| root, | Only when the installer generated the password | The initial |
| web user and | Always, if absent | The encryption master key. Created whether or not encryption is on, so that turning it on later works. Never rotated or relocated by the installer, and an existing key is never touched. Back this up with your configuration. |
| root, | Fresh install and upgrade | The credential for the MongoDB administrative account NMIS owns. Keep it; it is how you recover database access. |
|
| Upgrade, first run only | A copy of your Access matrix before the administrator-only rights were realigned. An existing copy is kept rather than overwritten. |
|
| When a stored password hash is upgraded at sign-in |
|
The old /usr/local/etc/opmantek/seed.txt is no longer created. An existing one is left
alone and is not read.
What an upgrade does, in order
Before copying anything, the installer validates
adminpw_file=andomk_compat_user=and stops with a clear message if either is wrong. Nothing has been touched at this point.Configuration files. Warns and asks about plaintext password storage if it finds it. Sets the
nmisadministrator password if, and only if, the account has none, still carries the shipped marker, or still uses the old published default. A real password or a locked account is left alone.Configuration merge. Adds settings that are missing from your
conf/Config.nmis, and from yourconf/Events.nmisif you have one. Realigns your Access matrix with the administrator-only rights, once, keeping a copy. No question is asked for this.Authentication key. Replaces a placeholder or empty
auth_web_keywith a unique random one and says that existing sessions are now invalid. A unique key you set yourself is left alone. If the key comes from the environment it warns and changes nothing.Users and permissions. Creates the
nmisuser, now correctly when thenmisgroup already exists, and tells you the command to run if it could not.Encryption prerequisites. Reports any of
Crypt::CBC,CryptXandMath::Random::Securethat are missing, naming the packages to install, and continues. Ensures the secrets directory and creates the master key if there is none.Encryption posture, only if you passed
eos=.MongoDB setup, as above. This is where your database credentials change.
Apache. Installs the shipped configuration if yours is missing or different, and enables
mod_headers.OMK compatibility account, asked or taken from the option. A failure here warns and continues; it does not break the install.
Closing message, which tells you where the administrator password is and how to reset it.
Unattended installs
Under -- -y for unattended installs, the new questions take their defaults: yes to continuing past the plaintext
warning, yes to running MongoDB setup, and no to the OMK compatibility account. The
generated administrator password is never printed, only written to its file, so supply your
own with adminpw_file= if you need to know it in advance.
On an SELinux-enforcing host, add allow_selinux=1 or the install will abort.
A preseed file generated with -P includes the two new tags with those same defaults.
Dependency changes
Very little changed here. Most of what encryption of secrets needs was already being installed.
One package is added:
perl-TermReadKeyon RedHat-family,libterm-readkey-perlon Debian and Ubuntu, used to prompt for passwords without echoing them.The three modules encryption of secrets needs,
Crypt::CBC,CryptXandMath::Random::Secure, were already in the installer's package lists before 9.7.0. What is new is that the installer now checks they are present and tells you, with the package names for your platform, if they are not. It reports and continues; NMIS will not start with encryption enabled until they are there.NMIS now requires the MongoDB Perl driver 2.0.0 or newer. In practice it has needed a 2.x driver for some time and the requirement simply was not stated in the code. The installer handles this, and it no longer pins an outdated MongoDB driver on RedHat-family hosts, which it previously did on every version of them because of a coding error.
The dependency check no longer demands Perl modules that only the test suite and the contributed code use, which used to stop an unattended install.