nscp -- Control Port
$Header: /cvsroot/aolserver/aolserver/nscgi/nscgi.html,v 1.1 2000/10/04
22:27:23 kriston Exp $
Theory of Operation
Known Issues
Sample Configuration
Theory of Operation
The nscp module provides remote administration through a simple tclsh-like
interface. The user connects to the control port, logs in with a username
and a password, and types Tcl commands as if he was in any other tclsh.
All Tcl commands available to ADPs and Tcl scripts in AOLserver are available
with this interface. It is also a very valuable monitoring and debugging
tool. The interface to the Tcl interpreter is extremely simple and only
supports limited telnet control codes and does no terminal emulation.
Known Issues
Although you can type "CTRL-C" and exit the control port, if you started
any Tcl commands that run forever they will continue running for the live
of the server session. This can be useful if you need to run a long index
process and want to log out right away.
The default installation echos the password to the screen. If you want to
suppress the password, set "ns_param echopassword true" in the
config file. This option does not work on all platforms which is why it
is disabled by default. The password should not be very sensitive since
you need to connect via localhost to reach the control port on the default
installation, anyway.
While nscp can listen on any interface, we recommend that you nscp listens
on localhost (127.0.0.1) so that users who attempt to use the control port
are already authenticated Unix users.
Sample Configuration
The sample-config.tcl file has logic to set the control port username and
password at the top of the file. The default username is "nsadmin" and
the password is "x". This is disabled by default but you can re-enable
it by uncommenting the line.
To create a password, telnet to the control port with "nsadmin" and "x" and
then type "ns_crypt password salt". The gibberish that is returned
goes into the "nscp_user" variable.
# nscp: Uncomment the sample password and log in with "nsadmin", password "x",
# type "ns_crypt newpassword salt" and put the encrypted string below.
set nscp_port 9999
set nscp_addr 127.0.0.1
set nscp_user ""
#set nscp_user "nsadmin:t2GqvvaiIUbF2:" ;# sample user="nsadmin", pw="x".
#
# Control port -- nscp
#
# nscp does not load unless nscp_user is a valid user.
#
ns_section "ns/server/${servername}/module/nscp"
ns_param port $nscp_port
ns_param address $nscp_addr
ns_section "ns/server/${servername}/module/nscp/users"
ns_param user $nscp_user