attach a serial line network interface
sliplogin [loginname]
The sliplogin utility turns the terminal line on standard input into a Serial Line IP (or SLIP) link to a remote host. To do this, the utility searches the file /etc/slip.hosts for an entry matching loginname (which defaults to the current login name if omitted). If a matching entry is found, the line is configured appropriately for SLIP (8-bit transparent I/O). A shell script is then invoked to initialize the slip interface with the appropriate local and remote IP address, netmask, etc.
In most cases, the script invoked is /etc/slip.login. But if some hosts need special initialization, you can set up the script /etc/slip.login.loginname, which will be invoked instead. This script is invoked with the following parameters:
Only the superuser may attach a network interface. The interface is automatically detached when the other end hangs up or the sliplogin process dies (all routes through that interface will also disappear at the same time). If there's other processing you'd like done on hangup, the file /etc/slip.logout or /etc/slip.logout.loginname is executed, if it exists. The file is given the same arguments as the login script.
Blank lines and lines beginning with a pound sign (#) are ignored. Other lines must start with a loginname but the remaining arguments can be whatever is appropriate for the slip.login file that will be executed for that name. Arguments are separated by whitespace and follow normal sh quoting conventions (loginname, however, cannot be quoted). Usually, lines have the form:
loginname local_address remote_address netmask opt_args
where local_address and remote_address are the IP addresses or hostnames of the local and remote ends of the slip line, and netmask is the appropriate IP netmask. These arguments are passed directly to ifconfig. The opt_args are optional arguments used to configure the line.
Normally, sliplogin is used to create a /etc/passwd entry for each legal, remote slip site with sliplogin as the shell for that entry. For example:
Sfoo:x:2010:1:slip line to foo:/tmp:/etc/sliplogin
(Our convention is to name the account used by remote host hostname as Shostname.) An entry is then added to slip.hosts that looks like:
Sfoo `hostname` foo netmask
where hostname will be evaluated by sh to the local hostname and netmask is the local host IP netmask.
While this doesn't create a security hole, it does mean that unscrupulous users can place terminal lines in an unusable state or deny access to legitimate users of a remote slip line, or both. To prevent this, you can create a group, say slip, that only the slip login accounts are put in, and then make sure that /etc/sliplogin is in group slip and mode 4550 (setuid root; only group slip can execute binary).
The sliplogin utility logs various information to the system log. The messages are listed here, grouped by severity level.