From owner-freebsd-questions Fri Jan 25 11:36:35 2002 Delivered-To: freebsd-questions@freebsd.org Received: from sage-american.com (sage-american.com [216.122.141.44]) by hub.freebsd.org (Postfix) with ESMTP id CC54937B400 for ; Fri, 25 Jan 2002 11:36:28 -0800 (PST) Received: from SAGEONE (adsl-64-219-20-214.dsl.crchtx.swbell.net [64.219.20.214]) by sage-american.com (8.9.3/8.9.3) with SMTP id NAA15924; Fri, 25 Jan 2002 13:36:16 -0600 (CST) Message-Id: <3.0.5.32.20020125133613.01831ca0@mail.sage-american.com> X-Sender: jacks@mail.sage-american.com X-Mailer: QUALCOMM Windows Eudora Pro Version 3.0.5 (32) Date: Fri, 25 Jan 2002 13:36:13 -0600 To: Mark Drayton , Lance Bland From: jacks@sage-american.com Subject: Re: number of users Cc: adrian kok , questions@FreeBSD.ORG In-Reply-To: <20020125192444.A3916@drex.staff.izr.com> References: <0C288440-11C8-11D6-A67C-0030659A531A@vvi.com> <20020125190013.23955.qmail@web21210.mail.yahoo.com> <0C288440-11C8-11D6-A67C-0030659A531A@vvi.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ...or if you just want a summary of how many users there are allowed on the system, I have a script. At 07:24 PM 1.25.2002 +0000, Mark Drayton wrote: >Lance Bland (lbland@vvi.com) wrote: > >[..snip..] > >> If you just want to know how many are logged in then "finger" might >> work. or you might want to use "last", or "ac -p" > >Original poster: these methods will show how many users are currently >logged in. The following will tell you have many user accounts you have >with a UID > 1000 (ie non-system accounts): > >grep -v '^#' /etc/passwd | awk -F: '{ if ($3 > 1000) print $0 }' | wc -l > >eg: > >=== mark@mir:~$ grep -v '^#' /etc/passwd | awk -F: '{ if ($3 > 1000) print $0 }' | wc -l > 5 > >Cheers, > >-- > >Mark Drayton > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > Best regards, Jack L. Stone, Server Admin =================================================== Sage-American http://www.sage-american.com jacks@sage-american.com "My center is giving way, my right is in retreat; ....situation excellent! ....I shall attack!" =================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message