B.4 nsscon

The NSS Console (NSSCON, nsscon) utility for OES provides a command line interface in a console environment familiar to NetWare administrators. Use it to issue NSS commands and to monitor NSS activity through console messages.

Start the nsscon utility, then enter the usual NSS commands from the nsscon prompt. You can issue any NSS command that is valid for use at the nsscon command prompt. For information about NSS commands, see Section A.0, NSS Commands.

NOTE:The NSS command line utility (nss) is enhanced to support all the NSS commands that are supported by nsscon utility.

The Linux install creates symlinks in the /opt/novell/nss/sbin folder for common NSS utilities, including nsscon. Symlinks allow the path to the nsscon to become part of the root user’s path, which allows you to run it by entering nsscon at the system prompt.

The NSSCON utility uses a device file (/dev/nsscmd), which is set up to allow access only for the root user. Thus, only root can run nsscon. If you want to give access to a group of local users to run nsscon, use the chmod command on /dev/nsscmd to change the POSIX permissions for that group.

B.4.1 Adding /opt/novell/nss/sbin to the PATH Environment Variable

You can add /opt/novell/nss/sbin to the PATH environment variable:

  1. At a shell prompt, log in as the root user.

  2. From a Bash shell, set the path with the command

    export PATH=$PATH:/opt/novell/nss/sbin

    This allows you to run nsscon by entering ./nsscon at the system prompt.

B.4.2 Starting nsscon

  1. At a shell prompt, log in as the root user.

  2. Use one of the following methods to start NSSCON:

    • At a shell prompt, load NSSCON when its path is symlinked by entering

      nsscon
    • At a shell prompt, load NSSCON by its absolute pathname by entering

      /opt/novell/nss/sbin/nsscon
    • At a shell prompt, load NSSCON when its path is in the PATH environment variable by entering

      ./nsscon

B.4.3 Using nsscon in a Script

Only one instance of nsscon can be run at a time. If nsscon is already running when a script tries to run it, nsscon returns an error.

To work around this issue, you can send NSS commands directly to NSS via the /dev/nsscmd device.

For example, if you use a script to put pools into maintenance, use the following syntax:

echo "/PoolMaintenance=mypool" >/dev/nsscmd

This causes NSS to place MYPOOL into maintenance state even if nsscon is already running. Note that you do not echo an "nss " in front of commands to /dev/nsscmd.

If nsscon is running, then the output of your command is displayed by nsscon immediately. Otherwise, the output is held by NSS until nsscon is run. In OES 2015, NSS holds 400K worth of output before starting to throw the oldest away. In OES 1, NSS holds only 32K of output before wrapping output.