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

krshd Daemon

Purpose

Provides the server function for remote command execution.

Syntax

usr/sbin/krshd [ -s ]
Note: The rshd daemon is normally started by the inetd daemon. It can also be controlled from the command line, using SRC commands.

Description

The /usr/sbin/krshd daemon is the server for the rcp and rsh commands using Kerberos authentication. The krshd daemon provides remote execution of shell commands. These commands are based on requests from privileged sockets on trusted hosts. The shell commands must have user authentication. The krshd daemon listens at the kshell socket defined in the /etc/services file.

Changes to the krshd daemon can be made using the System Management Interface Tool (SMIT) or System Resource Controller (SRC), by editing the /etc/inetd.conf or /etc/services file. Entering krshd at the command line is not recommended. The krshd daemon is started by default when it is uncommented in the /etc/inetd.conf file.

The inetd daemon gets its information from the /etc/inetd.conf file and the /etc/services file.

After changing the /etc/inetd.conf or /etc/services file, run the refresh -s inetd or kill 1 InetdPID command to inform the inetd daemon of the changes to its configuration file.

Service Request Protocol

When the krshd daemon receives a service request, it initiates the following protocol:

  1. The krshd daemon checks the source port number for the request. If the port number is not in the range 0 through 1023, the krshd daemon terminates the connection.

  2. The krshd daemon reads characters from the socket up to a null byte. The string read is interpreted as an ASCII number (base 10). If this number is nonzero, the krshd daemon interprets it as the port number of a secondary stream to be used as standard error. A second connection is created to the specified port on the client host. The source port on the local host is also in the range 0 through 1023.

  3. The krshd daemon uses the source address of the initial connection request to determine the name of the client host. If the name cannot be determined, the krshd daemon uses the dotted decimal representation of the client host's address.

  4. The krshd daemon retrieves the following information from the initial socket:
  5. The krshd daemon attempts to validate the user using the following steps:
  6. Once krshd validates the user, the krshd daemon returns a null byte on the initial connection. If the connection is a Kerberos 5 ticket and the TGT is sent, the command line passes to the k5dcelogin command, (which upgrades it to full DCE credentials). If the TGT is not sent or if the connection is a Kerberos 4 ticket, the command line passes to the user's local login shell. The shell then inherits the network connections established by the krshd daemon.

    The krshd daemon is controlled by using the System Management Interface Tool (SMIT) or by changing the /etc/inetd.conf file. Entering krshd at the command line is not recommended.

Manipulating the krshd Daemon with the System Resource Controller

The krshd daemon is a subserver of the inetd daemon, which is a subsystem of the System Resource Controller (SRC). The krshd daemon is a member of the tcpip SRC subsystem group. Using the chauthent command will comment/uncomment the kshell line in the /etc/inetd.conf file and restart the inetd daemon depending on whether Kerberos 5 or Kerberos 4 is configured/unconfigured. This daemon should be manipulated using the chauthent/lsauthent commands. Direct modification of the inetd.conf file's kshell entry in not recommended.

Flags

-s Turns on socket-level debugging.

Examples

Note: The arguments for the krshd daemon can be specified by using SMIT or by editing the /etc/inetd.conf file.
  1. To start the krshd daemon, enter the following:
    startsrc -t kshel
    This command starts the krshd subserver.

  2. To stop the krshd daemon normally, enter the following:
    stopsrc -t kshel
    This command allows all pending connections to start and existing connections to complete but prevents new connections from starting.

  3. To force stop the krshd daemon and all krshd connections, enter the following:
    stopsrc -t -f kshell
    This command terminates all pending connections and existing connections immediately.

  4. To display a short status report about the krshd daemon, enter the following:
    lssrc -t kshell
    This command returns the daemon's name, process ID, and state (active or inactive).

Note: using the chauthent command will comment/uncomment the kshell line in the /etc/inetd.conf file and restart the inetd daemon depending on whether Kerberos 5 or Kerberos 4 is configured/unconfigured.

Related Information

The rsh command.

The inetd daemon.

The kvalid_user function.

The /etc/hosts.equiv file format, /etc/inetd.conf file format, and /etc/services file format.

Network Overview in AIX Version 4.3 System Management Guide: Communications and Networks.

Secure Rcmds in AIX Version 4.3 System User's Guide: Communications and Networks.


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