Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!kailand!pwolfe From: pwolfe@kailand.KAI.COM Newsgroups: comp.sys.sequent Subject: Re: why does who not show rlogin-users Message-ID: <2400057@kailand> Date: 10 Jun 89 15:54:00 GMT References: <964@maestro.htsa.aha.nl> Lines: 51 Nf-ID: #R:maestro.htsa.aha.nl:964:kailand:2400057:000:2817 Nf-From: kailand.KAI.COM!pwolfe Jun 10 10:54:00 1989 > /* Written by phil@sequent.UUCP in kailand:comp.sys.sequent */ > In article <964@maestro.htsa.aha.nl> jand@maestro.htsa.aha.nl (Jan Derriks) writes: > | Is this bug is a way of getting over the 32 user limit ? > Nope! Yep! Since /bin/login counts users by counting entries in /etc/utmp, if you are missing entries for some real or pseudo terminals in /etc/ttys, those logins don't get counted. I asked Sequent to find a better way to count logins back in early 1988, when I installed Screen V2.0, which had a new feature of adding entries to /etc/utmp for each window it created. Screen didn't count the existing /etc/utmp entries to make sure we didn't go over our limited user limit (and it shouldn't have to, since I don't think each window of a virtual terminal manager should be considered a separate login), and the next person to really login caused the system to panic "illegal number of users". Sequent Customer Service's official responce was "this will not be changed", and now that I understand the next release of Dynix will be based on System V (release 2? 3?), I guess I understand why they are reluctant to spend any time fixing non-serious bugs in the current release. I've since fixed Screen to (among other things) count logins (like /bin/login does) before adding any entries to utmp, and to allow each user to selectively "login" or "unlogin" windows at will. How does BSD 4.3 count logins? I've seen the quota checks in 4.3 tahoe's /bin/login (anonymously ftp'able from uunet.uu.net), but don't know where/how the data is actually stored and modified. We've run into problems when someone's session gets killed, but the entry in utmp doesn't get removed. They don't have any processes running, but they still show up in "w" or "who", and they also take up one of those precious user slots (one of our machines has only a 16 user license, and we have approx 20 people that want to use it). I've written a program to zero out specified entries from the utmp file, which I use to fix this problem (since the only other workaround is to reboot). While I only use my program to fix problems, a dishonest system administrator might use something similar to it in /etc/.login, so their site would never have to upgrade their user license (which is pretty cheap anyway). Also, if someone wanted to port that BSD 4.3 Tahoe /bin/login program, or install the one that passed through the source newsgroups earlier this year, they wouldn't run into user license limit problems (except possibly problems of the legal type, of course). Patrick Wolfe (pat@kai.com, {uunet,uiucuxc,alliant,sequent}!kailand!pat) System Manager, Kuck and Associates, Inc. "The opinions expressed here are strictly my own, and not neccessarily those of the company I work for. Please don't call my boss (again)."