sliplogin

attach a serial line network interface

Syntax:

sliplogin [loginname]

Options:

loginname
Alternate login name. (Default is the current login name).

Description:

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:

slipunit
The unit number of the slip interface assigned to this line; e.g. 0 for sl0.
speed
The speed of the line.
args
The arguments from the /etc/slip.hosts entry, in order, starting with loginname.

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.

Format of /etc/slip.hosts

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.

Examples:

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).

Files:

/etc/slip.hosts
Local and remote configuration details for a SLIP login session.
/etc/slip.login
/etc/slip.login.loginname
Generic and custom login files for a SLIP line.
/etc/slip.logout
/etc/slip.logout.loginname
Generic and custom logout files for a SLIP line.

Errors:

The sliplogin utility logs various information to the system log. The messages are listed here, grouped by severity level.

Error severity

/etc/slip.hosts: reason
The /etc/slip.hosts file couldn't be opened.
access denied for user
No entry for user was found in /etc/slip.hosts.
ioctl (TCGETS): reason
A TCGETS ioctl() to get the line parameters failed.
ioctl (TCSETS): reason
A TCSETS ioctl() to set the line parameters failed.

Notice severity

attaching slip unit unit for loginname
SLIP unit unit was successfully attached.

See also:

slattach