From owner-freebsd-isp@FreeBSD.ORG Fri Sep 12 00:08:38 2003 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8EEEA16A4BF for ; Fri, 12 Sep 2003 00:08:38 -0700 (PDT) Received: from flash.mipk-kspu.kharkov.ua (flash.mipk-kspu.kharkov.ua [194.44.157.113]) by mx1.FreeBSD.org (Postfix) with ESMTP id 42A1C43FF2 for ; Fri, 12 Sep 2003 00:08:27 -0700 (PDT) (envelope-from artem@mipk.kharkiv.edu) Received: from www.mipk.kharkiv.edu (flash.mipk-kspu.kharkov.ua [194.44.157.113])h8C76DH4042154 for ; Fri, 12 Sep 2003 10:06:19 +0300 (EEST) (envelope-from artem@mipk.kharkiv.edu) Received: from 192.168.9.37 (SquirrelMail authenticated user artem) by www.mipk.kharkiv.edu with HTTP; Fri, 12 Sep 2003 10:06:19 +0300 (EEST) Message-ID: <1174.192.168.9.37.1063350380.squirrel@www.mipk.kharkiv.edu> In-Reply-To: <20030911195243.18692.qmail@web20708.mail.yahoo.com> References: <63396.148.243.211.1.1063304771.squirrel@mail.unixmexico.com> <20030911195243.18692.qmail@web20708.mail.yahoo.com> Date: Fri, 12 Sep 2003 10:06:19 +0300 (EEST) From: "Artyom V. Viklenko" To: freebsd-isp@freebsd.org User-Agent: SquirrelMail/1.4.0 MIME-Version: 1.0 Content-Type: text/plain;charset=koi8-r X-Priority: 3 Importance: Normal Subject: Re: only one user logged per session/time X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2003 07:08:38 -0000 Something similar can be placed into system-wide profiles such as /etc/profile or /etc/csh.login. So, there will be no need to read passwd file and NIS-aware systems will work fine. And it will be transparent in terms of creating new users - no need separate login class. Also, there is no problem with rewritting environment variables (which some times can be set "readonly" due to security considerations). Lanny Godsey wrote: > > This isn't exactly what you want, but you may want to look at > /etc/login.conf and limit the # of processes, memory, and files a user > may have open. > > add the following to /etc/login.conf, then run cap_mkdb /etc/login.conf > > onelogin:\ > :tc=default:\ > :shell=/usr/local/bin/onelogin: > > > place the following into /usr/local/bin/onelogin > ------------------------------------------------------ > #!/bin/sh > # set the limit here. > CNT=1 > MYUID=`id -u` > DEVS=`find /dev -user $MYUID | wc -l` > if [ $DEVS -gt $CNT ]; then > echo Sorry, this system has limited you to only $CNT simultanious > connections. > exit > fi > # read users shell from passwd (this won't work with nis) > MYSHELL=`grep ^$USER: /etc/passwd | cut -d : -f 7` > # some /bin/sh variants may not allow to write to $SHELL > SHELL=$MYSHELL > # set the shell you want here > exec $MYSHELL > > ----------------------------------------------------------------- > -- Sincerely yours, Artyom V. Viklenko. ====================================================== System Administrator artem@mipk.kharkiv.edu ------------------------------------------------------ IIAT NTU "KhPI" 21, Frunze Str., Kharkov Ukraine 61002 Phone: +380 (572) 400026 Fax: +380 (572) 474062 ======================================================