Update Readme with the new -l from nwwebui
This commit is contained in:
83
README.md
83
README.md
@@ -1,6 +1,8 @@
|
||||
# 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
|
||||
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.
|
||||
|
||||
## Project status and integration
|
||||
|
||||
@@ -10,7 +12,7 @@ This repository is intended to be embedded into the main `mars_nwe` Git reposito
|
||||
- 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.
|
||||
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.
|
||||
|
||||
## Architecture overview
|
||||
|
||||
@@ -24,7 +26,7 @@ The current implementation adds a dedicated `nwwebui` service that can serve the
|
||||
- **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.
|
||||
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.
|
||||
|
||||
## Security model
|
||||
|
||||
@@ -32,11 +34,11 @@ SMArT uses PAM-based authentication through the `check_login` helper. The suppli
|
||||
|
||||
- `/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.
|
||||
That means no manual PAM file deployment is normally required when SMArT is installed through the integrated `mars_nwe` package or release.
|
||||
|
||||
## Installed components
|
||||
|
||||
The install rules include the following relevant components:
|
||||
The install rules include the following relevant components.
|
||||
|
||||
### Binaries
|
||||
|
||||
@@ -58,11 +60,11 @@ The install rules include the following relevant components:
|
||||
- optional `mars-nwe-webui.service` systemd 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.
|
||||
These components are all installed by the build system as part of the same integrated installation target.
|
||||
|
||||
## Typical runtime paths
|
||||
|
||||
The original templates use CMake placeholders. For documentation, the following **standard example paths** can be used in a typical Linux installation:
|
||||
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`
|
||||
@@ -79,9 +81,9 @@ These values are sensible standard defaults for documentation. Packaging may sti
|
||||
|
||||
## 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.
|
||||
The `smart.conf` file controls both the SMArT frontend behavior and the `nwwebui` listener settings.
|
||||
|
||||
A documented example with normal installation paths is shown below.
|
||||
A documented example with standard installation paths is shown below:
|
||||
|
||||
```perl
|
||||
# SMArT / nwwebui configuration file
|
||||
@@ -107,27 +109,30 @@ $smart_compact_nwservconf = 0;
|
||||
# ------------------------------------------------------------
|
||||
# SMArT internal file layout
|
||||
# ------------------------------------------------------------
|
||||
$smart_conf_path = '/etc/mars_nwe/smart.conf';
|
||||
$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';
|
||||
$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';
|
||||
|
||||
# Optional override, usually not needed
|
||||
# $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_bind_ip = '0.0.0.0';
|
||||
$nw_log_level = 1;
|
||||
$nw_daemonize = 0;
|
||||
$nw_pid_file = '/run/mars_nwe/nwwebui.pid';
|
||||
$nw_log_file = '/var/log/mars_nwe/nwwebui.log';
|
||||
|
||||
$nw_ssl_enable = 1;
|
||||
$nw_ssl_enable = 0;
|
||||
$nw_http_port = 9080;
|
||||
$nw_https_port = 9443;
|
||||
|
||||
$nw_cert_file = '/etc/mars_nwe/server.crt';
|
||||
$nw_key_file = '/etc/mars_nwe/server.key';
|
||||
$nw_cert_file = '/etc/mars_nwe/server.crt';
|
||||
$nw_key_file = '/etc/mars_nwe/server.key';
|
||||
```
|
||||
|
||||
## `smart.conf` settings explained
|
||||
@@ -152,9 +157,9 @@ These variables define the default SMArT page colors:
|
||||
### SMArT internal file layout
|
||||
|
||||
- `$smart_conf_path` – absolute path to `smart.conf`
|
||||
- `$smart_nwclient_path` – file used for bindery login information
|
||||
- `$smart_nwclient_path` – file used to store bindery login information for SMArT helper tools
|
||||
- `$smart_static_dir` – directory containing HTML, icons, and other static assets
|
||||
- `$smart_log_path` – SMArT frontend log file
|
||||
- `$smart_log_path` – log file used by the Perl-based SMArT frontend
|
||||
- `$smart_check_login` – PAM-based authentication helper path
|
||||
- `$smart_perl_path` – optional override for the main SMArT Perl executable; usually not needed
|
||||
|
||||
@@ -167,28 +172,29 @@ These variables define the default SMArT page colors:
|
||||
- `2` = debug output
|
||||
- `$nw_daemonize` – whether `nwwebui` detaches into the background
|
||||
- `$nw_pid_file` – location of the PID file
|
||||
- `$nw_log_file` – log file written by `nwwebui`
|
||||
- `$nw_ssl_enable` – enables or disables HTTPS support
|
||||
- `$nw_http_port` – HTTP listener port; set to `0` to disable plain HTTP
|
||||
- `$nw_https_port` – HTTPS listener port; set to `0` to 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:
|
||||
The current code and template show that:
|
||||
|
||||
- bind on `0.0.0.0`
|
||||
- HTTP on `9080`
|
||||
- HTTPS on `9443`
|
||||
- TLS enabled
|
||||
- `nwwebui` listens on `9080` for HTTP by default
|
||||
- `9443` is used for HTTPS
|
||||
- the log file can be configured with `$nw_log_file`
|
||||
- the log path can also be overridden at runtime with `-l`
|
||||
|
||||
That makes HTTPS the recommended way to access the interface, especially when passwords are used.
|
||||
Because passwords may be transmitted during login, HTTPS is the recommended way to access the interface.
|
||||
|
||||
## 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.
|
||||
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.
|
||||
|
||||
### 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.
|
||||
A typical installed system uses the `mars-nwe-webui.service` unit. The unit starts `nwwebui`, prepares the needed runtime directories, and loads the standard `smart.conf` file.
|
||||
|
||||
Typical commands:
|
||||
|
||||
@@ -211,7 +217,7 @@ The service unit starts `nwwebui` with the equivalent of:
|
||||
`nwwebui` can also be launched manually. The built-in usage text documents the supported options:
|
||||
|
||||
```text
|
||||
Usage: nwwebui [-h] [-d] [-s] [-c <smart.conf>] [-p <pidfile>]
|
||||
Usage: nwwebui [-h] [-d] [-s] [-c <smart.conf>] [-p <pidfile>] [-l <logfile>]
|
||||
|
||||
Options:
|
||||
-h, --help Show this help text and exit
|
||||
@@ -219,6 +225,7 @@ Options:
|
||||
-s, --stop Stop the running nwwebui instance
|
||||
-c, --config <file> Use an alternate smart.conf path
|
||||
-p, --pidfile <file> Override PID file path
|
||||
-l, --logfile <file> Override log file path
|
||||
```
|
||||
|
||||
Typical examples:
|
||||
@@ -235,8 +242,16 @@ Typical examples:
|
||||
|
||||
# use a custom PID file
|
||||
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf -p /run/mars_nwe/nwwebui.pid
|
||||
|
||||
# use a custom log file
|
||||
/usr/sbin/nwwebui -c /etc/mars_nwe/smart.conf -l /var/log/mars_nwe/custom-nwwebui.log
|
||||
|
||||
# override both PID and log file
|
||||
/usr/sbin/nwwebui -d -c /etc/mars_nwe/smart.conf -p /run/mars_nwe/nwwebui.pid -l /var/log/mars_nwe/nwwebui.log
|
||||
```
|
||||
|
||||
The `-l` option overrides `$nw_log_file` from `smart.conf` at runtime.
|
||||
|
||||
Typical access URLs:
|
||||
|
||||
- `http://<host>:9080/`
|
||||
@@ -254,8 +269,8 @@ This repository is built as part of the main `mars_nwe` build. The build system:
|
||||
- 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.
|
||||
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.
|
||||
|
||||
## 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.
|
||||
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 standard listener 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.
|
||||
|
||||
Reference in New Issue
Block a user