B.13 NSSCON (Linux)

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

Unlike NSS utilities, the NSS commands cannot be issued directly at the Linux terminal console. Therefore, you 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 on Linux at the nsscon command prompt. For information about NSS commands, see Section A.0, NSS Commands.

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.13.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.13.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.13.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 2 Linux, NSS holds 400K worth of output before starting to throw the oldest away. In OES 1 Linux, NSS holds only 32K of output before wrapping output.