[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 5

sliplogin Command

Purpose

Converts a standard-input terminal line into a Serial Line Internet Protocol (SLIP) link to a remote host.

Syntax

sliplogin [LoginName]

Description

The sliplogin command configures a standard-input terminal line into a Serial Line Internet Protocol (SLIP) link to a remote host; that is, the command attaches a serial line network interface.

Note
User requires root authority to attach a network interface.

The sliplogin command searches the /etc/slip.hosts file for a loginname entry that matches the value of the LoginName parameter. If a matching entry is found, sliplogin configures the line appropriately for SLIP (that is, for 8-bit transparent input/output) and converts it to SLIP line discipline. Then, sliplogin invokes the applicable login shell script which initializes the SLIP interface with the local and remote Internet Protocol (IP) addresses, netmask, and optional arguments associated with the loginname entry in the /etc/slip.hosts file.

The usual initialization script file is /etc/slip.login. However, in order to accommodate special initialization needs of a particular host, a script file named /etc/slip.login.userlogin (where userlogin corresponds to the loginname entry in the /etc/slip.hosts file) can be created. The sliplogin command uses the /etc/slip.login.userlogin script file when it exists, instead of the /etc/slip.login script file.

To deinitialize the SLIP interface, the sliplogin command uses either the /etc/slip.logout script file or the /etc/slip.logout.userlogin script file, if one of them exists, with preference given to the latter. The /etc/slip.logout script file is given the same arguments as the /etc/slip.login script file; the /etc/slip.logout.userlogin script file is given the same arguments as the /etc/slip.login.userlogin script file. In its default form, the /etc/slip.logout script file deletes all routes through the network interface for the specified SLIP unit. Additional processes to be done when the SLIP interface is disconnected can be added to either logout script file.

Notes:
  1. The interface automatically deactivates when the remote connection terminates or when the sliplogin command dies.
  2. Use the slattach command to access a remote system that has a SLIP link configured. Use the sample shell script file /usr/sbin/slipcall to invoke the slattach command with the proper parameters needed to call a remote system and configure the local interface with the appropriate values assigned by the remote system.
  3. When using sliplogin as a user's login shell on a tty device, then this tty port used needs to be enabled for login. (This differs from the configuration when using slattach instead of sliplogin as a SLIP server process.

/etc/slip.hosts File

The /etc/slip.hosts file is the configuration file containing the names of preconfigured sliplogin users and the IP addresses to be assigned to the local and remote interface when the user logs in. sliplogin searches this file for matching LoginName entries. This file has the following format:

/etc/slip.login File

The /etc/slip.login or /etc/slip.login.userlogin file is the setup script invoked by the sliplogin command to initialize the user's network interface. The /etc/slip.login.userlogin file is invoked if it exists, where the value of the LoginName parameter of the sliplogin command corresponds to a loginname entry in the /etc/slip.hosts file. If this file cannot be accessed, the /etc/slip.login file is invoked instead. The login script file contains the following parameters:

slipunit Specifies the unit number of SLIP interface assigned to this line. For example, 0 for sl0 (sl0 is s, lowercase L, zero.)
speed Specifies the speed of the line.
args Specifies the arguments from the /etc/slip.hosts file entries, in order, starting with loginname.

/etc/slip.logout File

The /etc/slip.logout or /etc/slip.logout.userlogin file is the setup script invoked by sliplogin to deinitialize the user's network interface. The /etc/slip.logout.userlogin file is invoked if it exists, where the value of the LoginName parameter of sliplogin corresponds to a loginname entry in the /etc/slip.hosts file. If this file cannot be accessed, the /etc/slip.logout file is invoked instead.

Flags

</dev/ttyx Redirects the command to the ttyx device if the user is already logged into a tty device and wants to configure their terminal as a SLIP line.

Parameters

LoginName Specifies the desired login name. The default is the current login name.

Examples

The normal use of the sliplogin command is to create an /etc/passwd entry for each legal, remote SLIP site with sliplogin as the shell for the entry. For example,

foo:!:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin

An entry must then be added to the /etc/slip.hosts file. The entry should resemble the following example:

foo 1.1.1.1 1.1.1.2 0xffffff00 normal

where loginname = foo, local_address = 1.1.1.1, remote_address 1.1.1.2, netmask = 0xffffff00, and opt_args = normal. (The optional argument normal indicates which SLIP mode to activate. For AIX 4.1, only normal mode is supported. )

Diagnostics

The sliplogin command logs various information to the system log daemon (syslogd). The messages are listed here, grouped by severity levels.

Error Severity
Message Description
ioctl (TCGETS): reason The ioctl subroutine failed to get the line parameters for the reason indicated.
ioctl (TCSETS): reason The ioctl subroutine failed to set the line parameters for the reason indicated.
ioctl (TIOCGETD): reason The ioctl subroutine failed to get the current tty discipline for the reason indicated.
/etc/slip.hosts: reason The /etc/slip.hosts file could not be opened for the reason indicated.
Check of flags for interface xxx failed. Errno is reason. An attempt to check the status of the indicated interface to avert possible addressing conflicts failed for the reason indicated in the errno global variable.
Access denied for user - no /etc/slip.login[.userlogin] file. No /etc/slip.login or /etc/slip.login.userlogin script file could be found.
Access denied for user - no /etc/slip.hosts entries available. No loginname entry in the /etc/slip.hosts file matched the LoginName value specified in the command.
Access denied - getlogin returned 0. The user issuing the sliplogin command does not have a password entry in the /etc/passwd file.
Logout script failed: exit status xxx from /etc/slip.logout[.userlogin] An attempt to run the /etc/slip.logout or /etc/slip.logout.userlogin script file failed with the indicated exit status.
No SLIP interface for ttyx. Errno is reason. No SLIP interface could be located for the ttyx device for the reason indicated in the errno global variable. Try either running the ifconfig slx up command or using SMIT to add a network interface for the tty device.
Open /dev/null: reason An attempt to open the /dev/null device failed for the reason indicated.
/etc/slip.logout file not found The /etc/slip.logout file could not be located.
sliplogin: cannot add SLIP discipline to ttyx No SLIP interface exists for the ttyx device. Try either running the ifconfig slx up command or using SMIT to add a network interface for the tty device.
SLIP discipline removal from tty failed. Errno is reason. An attempt to remove the SLIP discipline from the tty device failed for the reason indicated in the errno global variable.
tcgetattr: reason An attempt to read the current attributes of the tty device failed for the reason indicated.
userlogin login failed: exit status xxx from /etc/slip.login[.userlogin] A system call to execute the /etc/slip.login or /etc/slip.login.userlogin script file failed with the indicated exit status.

Information Severity
Message Description
Attaching SLIP unit xxx for userlogin on ttyx. The sliplogin command found a loginname entry in the /etc/slip.hosts file that matched the LoginName value specified in the command, invoked the applicable /etc/slip.login or /etc/slip.login.userlogin file, and is now attaching the indicated network interface.
Closed userlogin SLIP unit xxx (signal) The indicated SLIP unit for the indicated userlogin was closed because the sliplogin command terminated due to a signal.

Notice Severity
Message Description
Attaching SLIP unit xxx for userlogin. The indicated SLIP unit has been successfully attached for the indicated userlogin.

Files

/etc/slip.hosts The configuration file that contains the names of preconfigured sliplogin users and the IP addresses to be assigned to the local and remote interface when the user logs in.
/etc/slip.login or /etc/slip.login.userlogin The setup script invoked by the sliplogin command to initialize the user's network interface.
/etc/slip.logout or /etc/slip.logout.userlogin The setup script invoked by the sliplogin command to deinitialize the user's network interface.

Related Information

The slattach command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]