Commit | Line | Data |
---|---|---|
b42074ab | 1 | .\" Copyright (c) 1990, 1991 The Regents of the University of California. |
8a41c435 KB |
2 | .\" All rights reserved. |
3 | .\" | |
4 | .\" %sccs.include.redist.man% | |
5 | .\" | |
162fb34f | 6 | .\" @(#)sliplogin.8 5.4 (Berkeley) %G% |
8a41c435 | 7 | .\" |
b42074ab CL |
8 | .Dd |
9 | .Dt SLIPLOGIN 8 | |
10 | .Os | |
11 | .Sh NAME | |
12 | .Nm sliplogin | |
13 | .Nd attach a serial line network interface | |
14 | .Sh SYNOPSIS | |
15 | .Nm sliplogin | |
16 | .Op Ar loginname | |
17 | .Sh DESCRIPTION | |
18 | .Nm Sliplogin | |
7569cceb | 19 | is used to turn the terminal line on standard input into |
b42074ab CL |
20 | a Serial Line IP |
21 | .Pq Tn SLIP | |
22 | link to a remote host. To do this, the program | |
7569cceb | 23 | searches the file |
b42074ab | 24 | .Pa /etc/slip.hosts |
7569cceb | 25 | for an entry matching |
b42074ab | 26 | .Ar loginname |
7569cceb TH |
27 | (which defaults to the current login name if omitted). |
28 | If a matching entry is found, the line is configured appropriately | |
b42074ab CL |
29 | for slip (8-bit transparent i/o) and converted to |
30 | .Tn SLIP | |
31 | line | |
7569cceb | 32 | discipline. Then a shell script is invoked to initialize the slip |
b42074ab CL |
33 | interface with the appropriate local and remote |
34 | .Tn IP | |
35 | address, | |
7569cceb | 36 | netmask, etc. |
b42074ab | 37 | .Pp |
7569cceb | 38 | The usual initialization script is |
b42074ab | 39 | .Pa /etc/slip.login |
7569cceb | 40 | but, if particular hosts need special initialization, the file |
b42074ab | 41 | .Pa /etc/slip.login. Ns Ar loginname |
7569cceb TH |
42 | will be executed instead if it exists. |
43 | The script is invoked with the parameters | |
b42074ab CL |
44 | .Bl -tag -width slipunit |
45 | .It Em slipunit | |
7569cceb | 46 | The unit number of the slip interface assigned to this line. E.g., |
b42074ab | 47 | .Sy 0 |
7569cceb | 48 | for |
b42074ab CL |
49 | .Sy sl0 . |
50 | .It Em speed | |
7569cceb | 51 | The speed of the line. |
b42074ab | 52 | .It Em args |
7569cceb | 53 | The arguments from the |
b42074ab | 54 | .Pa /etc/slip.hosts |
7569cceb | 55 | entry, in order starting with |
b42074ab CL |
56 | .Ar loginname . |
57 | .El | |
58 | .Pp | |
8a41c435 | 59 | Only the super-user may attach a network interface. The interface is |
7569cceb | 60 | automatically detached when the other end hangs up or the |
b42074ab | 61 | .Nm sliplogin |
7569cceb | 62 | process dies. If the kernel slip |
8a41c435 | 63 | module has been configured for it, all routes through that interface will |
7569cceb TH |
64 | also disappear at the same time. If there is other processing a site |
65 | would like done on hangup, the file | |
b42074ab | 66 | .Pa /etc/slip.logout |
7569cceb | 67 | or |
b42074ab | 68 | .Pa /etc/slip.logout. Ns Ar loginname |
7569cceb | 69 | is executed if it exists. It is given the same arguments as the login script. |
b42074ab | 70 | .Ss Format of /etc/slip.hosts |
7569cceb TH |
71 | Comments (lines starting with a `#') and blank lines are ignored. |
72 | Other lines must start with a | |
b42074ab | 73 | .Ar loginname |
7569cceb | 74 | but the remaining arguments can be whatever is appropriate for the |
b42074ab | 75 | .Pa slip.login |
7569cceb TH |
76 | file that will be executed for that name. |
77 | Arguments are separated by white space and follow normal | |
b42074ab | 78 | .Xr sh 1 |
7569cceb | 79 | quoting conventions (however, |
b42074ab | 80 | .Ar loginname |
7569cceb TH |
81 | cannot be quoted). |
82 | Usually, lines have the form | |
b42074ab | 83 | .Bd -literal -offset indent |
7569cceb | 84 | loginname local-address remote-address netmask opt-args |
b42074ab CL |
85 | .Ed |
86 | .Pp | |
7569cceb | 87 | where |
b42074ab | 88 | .Em local-address |
7569cceb | 89 | and |
b42074ab | 90 | .Em remote-address |
7569cceb TH |
91 | are the IP host names or addresses of the local and remote ends of the |
92 | slip line and | |
b42074ab | 93 | .Em netmask |
7569cceb TH |
94 | is the appropriate IP netmask. These arguments are passed |
95 | directly to | |
b42074ab CL |
96 | .Xr ifconfig 8 . |
97 | .Em Opt-args | |
7569cceb | 98 | are optional arguments used to configure the line. |
b42074ab | 99 | .Sh EXAMPLE |
7569cceb | 100 | The normal use of |
b42074ab | 101 | .Nm sliplogin |
7569cceb | 102 | is to create a |
b42074ab | 103 | .Pa /etc/passwd |
7569cceb | 104 | entry for each legal, remote slip site with |
b42074ab | 105 | .Nm sliplogin |
7569cceb | 106 | as the shell for that entry. E.g., |
b42074ab | 107 | .Bd -literal |
7569cceb | 108 | Sfoo:ikhuy6:2010:1:slip line to foo:/tmp:/etc/sliplogin |
b42074ab CL |
109 | .Ed |
110 | .Pp | |
7569cceb | 111 | (Our convention is to name the account used by remote host |
b42074ab | 112 | .Ar hostname |
7569cceb | 113 | as |
b42074ab | 114 | .Em Shostname . ) |
7569cceb | 115 | Then an entry is added to |
b42074ab | 116 | .Pa slip.hosts |
7569cceb | 117 | that looks like: |
b42074ab CL |
118 | .Pp |
119 | .Bd -literal -offset indent -compact | |
7569cceb | 120 | Sfoo `hostname` foo netmask |
b42074ab CL |
121 | .Ed |
122 | .Pp | |
7569cceb | 123 | where |
b42074ab | 124 | .Em `hostname` |
7569cceb | 125 | will be evaluated by |
b42074ab | 126 | .Xr sh |
7569cceb | 127 | to the local host name and |
b42074ab | 128 | .Em netmask |
7569cceb | 129 | is the local host IP netmask. |
b42074ab | 130 | .Pp |
7569cceb | 131 | Note that |
b42074ab | 132 | .Nm sliplogin |
7569cceb TH |
133 | must be setuid to root and, while not a security hole, moral defectives |
134 | can use it to place terminal lines in an unusable state and/or deny | |
135 | access to legitimate users of a remote slip line. To prevent this, | |
136 | a site can create a group, say | |
b42074ab | 137 | .Em slip , |
7569cceb | 138 | that only the slip login accounts are put in then make sure that |
b42074ab | 139 | .Pa /etc/sliplogin |
7569cceb | 140 | is in group |
b42074ab | 141 | .Em slip |
7569cceb | 142 | and mode 4550 (setuid root, only group |
b42074ab | 143 | .Em slip |
7569cceb | 144 | can execute binary). |
b42074ab CL |
145 | .Sh DIAGNOSTICS |
146 | .Nm Sliplogin | |
8a41c435 | 147 | logs various information to the system log daemon, |
b42074ab | 148 | .Xr syslogd 8 , |
8a41c435 | 149 | with a facility code of |
b42074ab | 150 | .Em daemon . |
8a41c435 | 151 | The messages are listed here, grouped by severity level. |
162fb34f | 152 | .Pp |
b42074ab | 153 | .Sy Error Severity |
162fb34f | 154 | .Bl -tag -width Ds -compact |
b42074ab | 155 | .It Sy ioctl (TCGETS): Em reason |
8a41c435 | 156 | A |
b42074ab CL |
157 | .Dv TCGETS |
158 | .Fn ioctl | |
8a41c435 | 159 | to get the line parameters failed. |
162fb34f | 160 | .Pp |
b42074ab | 161 | .It Sy ioctl (TCSETS): Em reason |
8a41c435 | 162 | A |
b42074ab CL |
163 | .Dv TCSETS |
164 | .Fn ioctl | |
8a41c435 | 165 | to set the line parameters failed. |
162fb34f | 166 | .Pp |
b42074ab | 167 | .It Sy /etc/slip.hosts: Em reason |
8a41c435 | 168 | The |
b42074ab | 169 | .Pa /etc/slip.hosts |
8a41c435 | 170 | file could not be opened. |
162fb34f | 171 | .Pp |
b42074ab | 172 | .It Sy access denied for Em user |
7569cceb | 173 | No entry for |
b42074ab | 174 | .Em user |
7569cceb | 175 | was found in |
b42074ab CL |
176 | .Pa /etc/slip.hosts . |
177 | .El | |
178 | .Pp | |
179 | .Sy Notice Severity | |
162fb34f | 180 | .Bl -tag -width Ds -compact |
b42074ab CL |
181 | .It Sy "attaching slip unit" Em unit Sy for Ar loginname |
182 | .Tn SLIP | |
183 | unit | |
184 | .Em unit | |
7569cceb | 185 | was successfully attached. |
b42074ab CL |
186 | .El |
187 | .Sh SEE ALSO | |
188 | .Xr slattach 8 , | |
189 | .Xr syslogd 8 | |
190 | .Sh HISTORY | |
191 | The | |
192 | .Nm | |
193 | command | |
194 | .Bt |