From owner-freebsd-isp Fri Apr 10 06:21:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA04882 for freebsd-isp-outgoing; Fri, 10 Apr 1998 06:21:09 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from Radford.i-Plus.net (root@NS.i-Plus.net [208.24.67.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA04876 for ; Fri, 10 Apr 1998 06:21:04 -0700 (PDT) (envelope-from rewt@i-Plus.net) Received: from abyss (old@b.nu [208.24.67.58]) by Radford.i-Plus.net (8.8.8/8.8.5) with SMTP id JAA18177; Fri, 10 Apr 1998 09:20:22 -0400 (EDT) Message-ID: <006501bd6484$5c602f30$3a4318d0@abyss.b.nu> From: "Troy Settle" To: "Alejandro Galindo Chairez AGALINDO" Cc: Subject: Re: Thanks (Was: Re: passwd to .htpasswd script) Date: Fri, 10 Apr 1998 09:27:07 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hmmm... dunno if Susie ended up changing what I had, but here's what I came up with. You may need to adjust the '14' to skip all the system accounts at the top of the passwd file. Another option, is using grep to get all users with a specific GID. For example, all my dialup users are GID 10000. #!/bin/sh count=`/usr/bin/wc -l /etc/master.passwd | awk '{ print $1}'` numusers=`/bin/expr ${count} - 14` /usr/bin/tail -n ${numusers} /etc/master.passwd | /usr/bin/cut -f 1,2 -d : for greping... #!/bin/sh grep ${GID} /etc/master.passwd | /usr/bin/cut -f 1,2 -d : To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message