10 KiB
SMArT
SMArT is the web-based configuration interface for MARS_NWE, a Novell NetWare 3.x emulator for Linux and FreeBSD. In the current setup, this repository is no longer treated as a standalone component only. It is integrated into the main mars_nwe project as a Git submodule and is therefore included in the normal mars_nwe release process. fileciteturn0file0L1-L3
Project status and integration
This repository is intended to be embedded into the main mars_nwe Git repository:
- Main project:
mars_nwe - Submodule role: provides the SMArT web UI and helper tools
- Release model: shipped as part of the integrated MARS_NWE release, not as a separate end-user release artifact
The build and install rules show that the web UI binaries, Perl helpers, configuration, static assets, and PAM file are installed as part of the overall build and installation flow. fileciteturn0file1L1-L53
Architecture overview
SMArT consists of two main parts:
- Perl-based application logic for configuration pages and helper scripts
nwwebuiservice as the web frontend that exposes the application over HTTP and HTTPS
The current implementation adds a dedicated nwwebui service that can serve the application directly over:
- HTTP on port 9080
- HTTPS on port 9443
The service supports TLS via OpenSSL and can run both listeners in parallel. HTTPS is the preferred mode because authentication happens more securely over an encrypted connection, while plain HTTP may still be useful for testing or trusted internal environments. The code defaults confirm support for HTTP on 9080, HTTPS on 9443, and TLS enabled by default in the service layer. fileciteturn0file1L31-L53 fileciteturn0file2L1-L26
Security model
SMArT uses PAM-based authentication through the check_login helper. The supplied PAM policy is a standard pam_unix stack for authentication, account, password, and session handling. During installation with MARS_NWE, this file is installed automatically as:
/etc/pam.d/smart
That means no manual PAM file deployment is normally required when SMArT is installed through the integrated mars_nwe package or release. fileciteturn0file1L42-L53 fileciteturn0file3L1-L4
Installed components
The install rules include the following relevant components:
Binaries
nwwebui– dedicated web service frontendcheck_login– PAM authentication helper
Perl helpers
smartapply.plreadconfig.plsettings.plstatic.pl
Configuration and assets
smart.conf- static HTML and image assets for the web UI
- optional
mars-nwe-webui.servicesystemd unit - PAM file installed as
/etc/pam.d/smart
These components are all installed by the build system as part of the same integrated installation target. fileciteturn0file1L31-L53
Typical runtime paths
The original templates use CMake placeholders. For documentation, the following standard example paths can be used in a typical Linux installation:
- Main MARS_NWE config directory:
/etc/mars_nwe - SMArT config file:
/etc/mars_nwe/smart.conf - Main MARS_NWE server config:
/etc/mars_nwe/nwserv.conf - Helper binaries and scripts:
/usr/libexec/mars_nwe - Static SMArT assets:
/usr/libexec/mars_nwe/static - Log directory:
/var/log/mars_nwe - PID directory:
/run/mars_nwe - TLS certificate:
/etc/mars_nwe/server.crt - TLS private key:
/etc/mars_nwe/server.key - PAM file:
/etc/pam.d/smart
These values are sensible standard defaults for documentation. Packaging may still adjust them depending on the target distribution.
The smart.conf file
The smart.conf file controls both the SMArT frontend behavior and the nwwebui listener settings. The shipped template documents the available keys in detail. fileciteturn0file2L1-L118
A documented example with normal installation paths is shown below.
# SMArT / nwwebui configuration file
# ------------------------------------------------------------
# UI colors
# ------------------------------------------------------------
$COLOR_BACK = "#F0F0FF";
$COLOR_HEAD_BACK = "#C0C0FF";
$COLOR_HEAD_FORE = "#000000";
$COLOR_SUBH_BACK = "#D0D0FF";
$COLOR_SUBH_FORE = "#000000";
$COLOR_TEXT_BACK = "#E0E0FF";
$COLOR_TEXT_FORE = "#000000";
# ------------------------------------------------------------
# Main MARS_NWE configuration
# ------------------------------------------------------------
$mars_config = '/etc/mars_nwe/nwserv.conf';
$nonroot_user = 'nobody';
$smart_compact_nwservconf = 0;
# ------------------------------------------------------------
# SMArT internal file layout
# ------------------------------------------------------------
$smart_conf_path = '/etc/mars_nwe/smart.conf';
$smart_nwclient_path = '/etc/mars_nwe/.nwclient';
$smart_static_dir = '/usr/libexec/mars_nwe/static';
$smart_log_path = '/var/log/mars_nwe/smart.log';
$smart_check_login = '/usr/libexec/mars_nwe/check_login';
# $smart_perl_path = '/usr/libexec/mars_nwe/smart';
# ------------------------------------------------------------
# nwwebui listener settings
# ------------------------------------------------------------
$nw_bind_ip = '0.0.0.0';
$nw_log_level = 1;
$nw_daemonize = 0;
$nw_pid_file = '/run/mars_nwe/nwwebui.pid';
$nw_ssl_enable = 1;
$nw_http_port = 9080;
$nw_https_port = 9443;
$nw_cert_file = '/etc/mars_nwe/server.crt';
$nw_key_file = '/etc/mars_nwe/server.key';
smart.conf settings explained
UI colors
These variables define the default SMArT page colors:
$COLOR_BACK– page background$COLOR_HEAD_BACK/$COLOR_HEAD_FORE– main section header colors$COLOR_SUBH_BACK/$COLOR_SUBH_FORE– subsection header colors$COLOR_TEXT_BACK/$COLOR_TEXT_FORE– regular content row colors
Main MARS_NWE configuration
$mars_config– path to the mainnwserv.conffile that SMArT reads and updates$nonroot_user– unprivileged user account used when SMArT drops privileges$smart_compact_nwservconf– controls hownwserv.confis written back:0keeps comments, spacing, and the original structure as much as possible1writes a more compact version without the original long comment layout
SMArT internal file layout
$smart_conf_path– absolute path tosmart.conf$smart_nwclient_path– file used for bindery login information$smart_static_dir– directory containing HTML, icons, and other static assets$smart_log_path– SMArT frontend log file$smart_check_login– PAM-based authentication helper path$smart_perl_path– optional override for the main SMArT Perl executable; usually not needed
nwwebui listener settings
$nw_bind_ip– bind address for HTTP and HTTPS listeners, for example0.0.0.0for all IPv4 interfaces or127.0.0.1for localhost-only access$nw_log_level– service log verbosity:0= errors only1= informational messages2= debug output
$nw_daemonize– whethernwwebuidetaches into the background$nw_pid_file– location of the PID file$nw_ssl_enable– enables or disables HTTPS support$nw_http_port– HTTP listener port; set to0to disable plain HTTP$nw_https_port– HTTPS listener port; set to0to disable HTTPS$nw_cert_file– PEM certificate path for TLS$nw_key_file– PEM private key path for TLS
The code defaults and the template together show that the intended standard deployment is:
- bind on
0.0.0.0 - HTTP on
9080 - HTTPS on
9443 - TLS enabled
That makes HTTPS the recommended way to access the interface, especially when passwords are used. fileciteturn0file2L73-L118 fileciteturn0file2L17-L26
Starting the service
Depending on the installation method, nwwebui can be started either via systemd or directly from the command line. The build system installs a mars-nwe-webui.service unit when systemd support is enabled. fileciteturn1file0L48-L50
Starting with systemd
A typical installed system uses the mars-nwe-webui.service unit. The unit starts nwwebui, creates the log and PID directories before startup, and loads the standard smart.conf file.
Typical commands:
systemctl enable --now mars-nwe-webui.service
systemctl start mars-nwe-webui.service
systemctl stop mars-nwe-webui.service
systemctl restart mars-nwe-webui.service
systemctl status mars-nwe-webui.service
The service unit starts nwwebui with the equivalent of:
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf
Starting from the command line
nwwebui can also be launched manually. The built-in usage text documents the supported options:
Usage: nwwebui [-h] [-d] [-s] [-c <smart.conf>] [-p <pidfile>]
Options:
-h, --help Show this help text and exit
-d, --daemon Run in daemon mode
-s, --stop Stop the running nwwebui instance
-c, --config <file> Use an alternate smart.conf path
-p, --pidfile <file> Override PID file path
Typical examples:
# start in foreground with the standard configuration
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf
# start in daemon mode
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf
# stop a running instance
/usr/sbin/nwwebui -s -c /etc/mars_nwe/smart.conf
# use a custom PID file
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf -p /run/mars_nwe/nwwebui.pid
Typical access URLs:
http://<host>:9080/https://<host>:9443/
For production use, HTTPS should be preferred.
Build and installation notes
This repository is built as part of the main mars_nwe build. The build system:
- generates
smart.conffrom the template - generates the
smartlauncher script - builds
nwwebui - builds
check_login - installs the PAM file and static UI assets
Because this repository is integrated as a Git submodule in mars_nwe, end users normally consume it through the main mars_nwe source tree and release packages rather than using it as a standalone project. fileciteturn0file1L1-L53
Summary
SMArT is now an integrated part of the mars_nwe release and includes a dedicated nwwebui service that can expose the interface over both HTTP and HTTPS. The current standard ports are 9080 for HTTP and 9443 for HTTPS. Authentication is handled through PAM, and the required /etc/pam.d/smart file is installed automatically together with the integrated MARS_NWE installation. fileciteturn0file1L31-L53 fileciteturn0file2L73-L118 fileciteturn0file3L1-L4