[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 1

chsubserver Command

Purpose

Changes the contents of the /etc/inetd.conf file or similar system configuration file.

Syntax

To Add or Activate a Server or Subserver Entry:

chsubserver [ -a ] -v ServiceName -p protocol [-t socket_type ][-w WaitIndicator ] [-u user ] [-g program ] [ -r server ] [-C ConfigFile ] [ program ] [ args ]

To Change a Server Entry:

chsubserver -c -v ServiceName -p protocol [-t SocketType ] [-w WaitIndicator ] [-u user ] [-g program ] [-V NewServiceName ] [-P NewProtocol ] [-T NewSocketType ] [-W NewWaitIndicator ] [-U NewUser ] [-G NewProgram ] [ -r server ] [-C ConfigFile ] [ program ] [ args ]

To Deactivate a Server Entry or an inetd Subserver Entry:

chsubserver -d -v ServiceName -p protocol [-t SocketType ] [-w WaitIndicator ] [-u user ] [-g program ] [ -r server ] [-C ConfigFile ] [ program ] [ args ]

Description

The chsubserver command adds, deletes, or changes entries in the /etc/inetd.conf system configuration file, which is the default, or a similar configuration file. These entries are related to known services used in the DARPA Internet and also related to information used by the inetd server. The entries for the inetd server determine how the system handles Internet service requests.

The chsubserver command also allows the user to refresh a server using the -r flag. The server specified is sent a SIGHUP signal to reread its configuration file. This allows you to edit the configuration file and have the changes take effect immediately.

Each service entry contains information about known services and information used by the inetd server. The chsubserver command manipulates the following entries for known services and for inetd server or other subserver information:

You can use the Web-based System Manager System application (wsm system fast path) run this command. You could also use the System Management Interface Tool (SMIT) smit inetdconf fast path to run this command.

Flags

-a Adds or activates an entry in the configuration file. If the requested service exists in the configuration file, the -a flag uncomments the line. If the line does not exist, the -a flag adds the line to the configuration file. This is the default action.
-c Changes an entry in the configuration file.
-C Specifies a configuration file similar to /etc/inetd.conf.
-d Deactivates an entry in the configuration file by commenting the line in the file.
-G NewProgram Replaces the existing program to start.
-g Program Specifies the program to start..
-P NewProtocol Specifies a new protocol name for a current protocol name.
-p protocol Specifies the protocol.
-r server Sends a SIGHUP to the specified server.
-T NewSocketType Replaces the existing type of socket, either a value of stream for stream sockets or a value of dgram for datagram sockets.
-t SocketType Specifies a type of socket, either a value of stream for stream sockets or a value of dgram for datagram sockets.
-U NewUser Replaces the existing user name.
-u user Specifies a user name.
-V NewName Specifies a new service name.
-v ServiceName Specifies the service name.
-W NewWaitIndicator Replaces the existing WaitIndicator.
-w WaitIndicator Specifies either single-thread service with a value of wait or multithread service with a value of nowait.

Security

Access Control: Only the root user and members of the system group have access to this command.

Examples

  1. To uncomment the uucp line in the /etc/inetd.conf file, enter:
    chsubserver -a -v uucp 
    -p tcp 
  2. To add a line to the /etc/inetd.conf file that describes the gregserv service and runs the program /usr/sbin/gregserv as root over the udp protocol with stream sockets and arguments of ftpd, enter in one line:
    chsubserver -a -r inetd 
    -v gregserv -p 
    udp -t stream -w nowait -u root -g /usr/sbin/gregserv 
    ftpd
    The inetd does not wait for confirmation. After adding the line to the file, the inetd program will be sent a SIGHUP signal.
  3. To change the existing service from using stream sockets to using dgram sockets in the /tmp/inetd.conf file, enter in one line:
    chsubserver -c -v 
    gregserv -p udp -t 
    stream -T dgram -C /tmp/inetd.conf
  4. To comment the gregserv service over udp in the /etc/inetd.conf file, enter:
    chsubserver -d -v 
    gregserv -p 
    udp

Files

/usr/sbin/chsubserver Contains the chsubserver command.
/etc/ inetd.conf Contains configuration information for the inetd daemon.

Related Information

The chservices command.

The inetd daemon, fing erd daemon, ftpd daemon, rexe cd daemon, rlo gind daemon, rshd daemon, syslo gd daemon, talkd daemon, te lnetd daemon, tftpd daemon.

The inetd.conf file format, protocols file format, services file format.

Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

The SMIT Interface for TCP/IP in AIX Version 4.3 System Management Guide: Communications and Networks.

TCP /IP Daemons in AIX Version 4.3 System Management Guide: Communications and Networks.


[ Previous | Next | Contents | Glossary | Home | Search ]