*BSD News Article 68036


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.mel.connect.com.au!news.mira.net.au!inquo!in-news.erinet.com!izzy.net!aanews.merit.net!imci3!imci4!newsfeed.internetmci.com!News.LiveNet.Net!beast
From: jsloan@LiveNet.Net (Jim Sloan)
Newsgroups: comp.unix.bsd.bsdi.misc
Subject: Re: Only one PPP account
Date: Thu, 09 May 96 02:40:21 GMT
Organization: LiveNet, Inc.
Lines: 43
Message-ID: <4mrm09$5th@PaperBoy.LiveNet.Net>
References: <4mnslr$las@mikasa.iol.it>
NNTP-Posting-Host: aqua.livenet.net
X-Newsreader: News Xpress 2.0 Beta #0

In article <4mnslr$las@mikasa.iol.it>, luba@tikal.net.gt (Luis F. Barrera) 
wrote:
>Hi,
>        I'd like to know if I can limit one PPP account per user, I mean,
>for example, if one person has logged into the BSDI machine, then no
>other person can log into the same machine with the same account.
>Besides, I'd like to know where I can put some account management code
>after the user has logged into the machine with a PPP account.
>To anyone: I'll appreciate any help.
>
>Luis F. Barrera
>email: luba@tikal.net.gt
>

What we did, was set all users to use csh as their default shell, and then 
chmod 555 ppp so it can be executed
This is our /etc/csh.cshrc file and works great to keep users limited to one 
port

# System-wide .cshrc file for csh(1).
# digiboard modem ports all start with ttyA (change as needed for
# various multiport cards)
MODEMPORTS="ttyA"
# set UCNT to count of this user showing up in who
set UCNT=`who | grep $USER | grep -c $MODEMPORTS`
if ( $UCNT > 1) then
   echo "You are already logged in."
   echo "Disconnecting you from the server now."
   logout
endif

exec ppp


------------------------------------------------------------------------
 Jim Sloan                        jsloan@livenet.net
 Vice President
 LiveNet, Inc.                         
 413 Davis St. Suite 106          Full Service Internet Provider
 Virginia Beach VA 23462          Dialup and dedicated connections
 Ph: 804-499-9328                 Virtual Web, Email, and FTP hosting
 http://www.livenet.net           info@livenet.net webmaster@livenet.net
------------------------------------------------------------------------