⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sliplogin.8

📁 早期freebsd实现
💻 8
字号:
.\" Copyright (c) 1990, 1991, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)sliplogin.8	8.2 (Berkeley) 1/5/94.\".Dd January 5, 1994.Dt SLIPLOGIN 8.Os.Sh NAME.Nm sliplogin.Nd attach a serial line network interface.Sh SYNOPSIS.Nm sliplogin.Op Ar loginname.Sh DESCRIPTION.Nm Sliploginis used to turn the terminal line on standard input intoa Serial Line IP.Pq Tn SLIPlink to a remote host.  To do this, the programsearches the file.Pa /etc/sliphome/slip.hostsfor an entry matching.Ar loginname(which defaults to the current login name if omitted).If a matching entry is found, the line is configured appropriatelyfor slip (8-bit transparent i/o) and converted to.Tn SLIPlinediscipline.  Then a shell script is invoked to initialize the slipinterface with the appropriate local and remote.Tn IPaddress,netmask, etc..PpThe usual initialization script is.Pa /etc/sliphome/slip.loginbut, if particular hosts need special initialization, the file.Pa /etc/sliphome/slip.login. Ns Ar loginnamewill be executed instead if it exists.The script is invoked with the parameters.Bl -tag -width slipunit.It Em slipunitThe unit number of the slip interface assigned to this line.  E.g.,.Sy 0for.Sy sl0 ..It Em speedThe speed of the line..It Em argsThe arguments from the.Pa /etc/sliphome/slip.hostsentry, in order starting with.Ar loginname ..El.PpOnly the super-user may attach a network interface.  The interface isautomatically detached when the other end hangs up or the.Nm sliploginprocess dies.  If the kernel slipmodule has been configured for it, all routes through that interface willalso disappear at the same time.  If there is other processing a sitewould like done on hangup, the file.Pa /etc/sliphome/slip.logoutor.Pa /etc/sliphome/slip.logout. Ns Ar loginnameis executed if it exists.  It is given the same arguments as the login script..Ss Format of /etc/sliphome/slip.hostsComments (lines starting with a `#') and blank lines are ignored.Other lines must start with a.Ar loginnamebut the remaining arguments can be whatever is appropriate for the.Pa  slip.loginfile that will be executed for that name.Arguments are separated by white space and follow normal.Xr sh 1quoting conventions (however,.Ar loginnamecannot be quoted).Usually, lines have the form.Bd -literal -offset indentloginname local-address remote-address netmask opt-args.Ed.Ppwhere.Em local-addressand.Em remote-addressare the IP host names or addresses of the local and remote ends of theslip line and.Em netmaskis the appropriate IP netmask.  These arguments are passeddirectly to.Xr ifconfig 8 ..Em Opt-argsare optional arguments used to configure the line..Sh EXAMPLEThe normal use of.Nm sliploginis to create a.Pa /etc/passwdentry for each legal, remote slip site with.Nm sliploginas the shell for that entry.  E.g.,.Bd -literalSfoo:ikhuy6:2010:1:slip line to foo:/tmp:/usr/sbin/sliplogin.Ed.Pp(Our convention is to name the account used by remote host.Ar hostnameas.Em Shostname . )Then an entry is added to.Pa slip.hoststhat looks like:.Pp.Bd -literal -offset indent -compactSfoo	`hostname`	foo	netmask.Ed.Ppwhere.Em `hostname`will be evaluated by.Xr shto the local host name and.Em netmaskis the local host IP netmask..PpNote that.Nm sliploginmust be setuid to root and, while not a security hole, moral defectivescan use it to place terminal lines in an unusable state and/or denyaccess to legitimate users of a remote slip line.  To prevent this,a site can create a group, say.Em slip ,that only the slip login accounts are put in then make sure that.Pa /usr/sbin/sliploginis in group.Em slipand mode 4550 (setuid root, only group.Em slipcan execute binary)..Sh DIAGNOSTICS.Nm Sliploginlogs various information to the system log daemon,.Xr syslogd 8 ,with a facility code of.Em daemon .The messages are listed here, grouped by severity level..Pp.Sy Error Severity.Bl -tag -width Ds -compact.It Sy ioctl (TCGETS): Em reasonA.Dv TCGETS.Fn ioctlto get the line parameters failed..Pp.It Sy ioctl (TCSETS): Em reasonA.Dv TCSETS.Fn ioctlto set the line parameters failed..Pp.It Sy /etc/sliphome/slip.hosts: Em reasonThe.Pa /etc/sliphome/slip.hostsfile could not be opened..Pp.It Sy access denied for Em userNo entry for.Em userwas found in.Pa /etc/sliphome/slip.hosts ..El.Pp.Sy Notice Severity.Bl -tag -width Ds -compact.It Sy "attaching slip unit" Em unit Sy for Ar loginname.Tn SLIPunit.Em unitwas successfully attached..El.Sh SEE ALSO.Xr slattach 8 ,.Xr syslogd 8.Sh HISTORYThe.Nmcommand.Bt

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -