From owner-freebsd-isp Wed Mar 20 7:14:25 2002 Delivered-To: freebsd-isp@freebsd.org Received: from ns2.wananchi.com (ns2.wananchi.com [62.8.64.4]) by hub.freebsd.org (Postfix) with ESMTP id C1DCA37B405 for ; Wed, 20 Mar 2002 07:14:11 -0800 (PST) Received: from wash by ns2.wananchi.com with local (Exim 3.35 #1 (FreeBSD)) id 16nhn1-0000Dz-00; Wed, 20 Mar 2002 18:14:11 +0300 Date: Wed, 20 Mar 2002 18:14:11 +0300 From: Odhiambo Washington To: David Rhodus Cc: FBSD-ISP Subject: Re: User Maanagement (Bulk Processing) Message-ID: <20020320151411.GN14038@ns2.wananchi.com> Mail-Followup-To: Odhiambo Washington , David Rhodus , FBSD-ISP References: <20020320142100.GJ14038@ns2.wananchi.com> <001d01c1d01d$b81d9520$1506810a@asgidavid> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <001d01c1d01d$b81d9520$1506810a@asgidavid> User-Agent: Mutt/1.3.25i X-Disclaimer: Any views expressed in this message,where not explicitly attributed otherwise, are mine alone!. X-Fortune: "But officer, I was only trying to gain enough speed so I could coast to the nearest gas station." X-Operating-System: FreeBSD 4.5-STABLE i386 X-Best-Window-Manager: XFCE X-Mailer: Mutt http://www.mutt.org/ X-Designation: Systems Administrator, Wananchi Online Ltd. X-Location: Nairobi, KE, East Africa. X-Uptime: 6:10PM up 11 days, 2:02, 1 user, load averages: 2.28, 2.24, 2.18 Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org * David Rhodus [20020320 17:49]: wrote: > Something like > #!/bin/sh > for a in `cat ./users.txt` ;do pw lock $a ;done > > then when user pays > pw unlock user Hmm, this does the trick. In fact I hadn't know about this even. However our CS Excecutives need to know when a user is locked out and the only way I can do this, because they finger the user, is to append "Suspended" to the user's .plan when I suspend and sub the word with a blank when I unsuspend. Thank you for this tip. I'll make use of it some day. > > -- > David Rhodus > ----- Original Message ----- > From: "Odhiambo Washington" > To: "FBSD-ISP" > Sent: Wednesday, March 20, 2002 9:21 AM > Subject: User Maanagement (Bulk Processing) > > > > Hello people, > > > > Allow me to ask this because I work for an ISP ;-) Actually I am just > seeking help > > from shell script gurus. I have a shell script that I use to suspend user > accounts > > on my FreeBSD box. It works well for single user but there are time like > now when > > I want to suspend over 400 users for non payment. I have another script > that can do > > this but again the problem is my scripts are so crude they do not do any > sensible > > checks . My bad. > > > > I am attaching the script - wol-suspend.sh Basically one of you gurus can > be able > > to modify this script so that it takes a flat file (badusers.txt) which > has one > > user per line and suspend all of them, yes?? I sincerely hate to do > > > > ./wol-suspend.sh userx > > ./wol-suspend.sh userb > > > > My insistence on this is because our Customer Service Executives will > verify the user's > > status by doing > > > > finger userx > > > > and they'll see Plan: Suspended. > > > > > > Other than this, what tools do pepole use for such tasks? Someone willing > to share > > what they have?? > > > > > > > > Thanking you. > > > > > > -Wash > > > > -- > > Odhiambo Washington "The box said 'Requires > > Wananchi Online Ltd. www.wananchi.com Windows 95, NT, or better,' > > Tel: 254 2 313985-9 Fax: 254 2 313922 so I installed FreeBSD." > > GSM: 254 72 743 223 GSM: 254 733 744 121 This sig is McQ! :-) > > > > ++ > > Kleptomaniac, n.: > > A rich thief. > > -- Ambrose Bierce, "The Devil's Dictionary" > > -Wash S y s t e m s A d m i n i s t r a t o r -- Odhiambo Washington /"\ RED Ribbon Campaign Wananchi Online Ltd., \ / Against AIDS. X "Help fight the scourge - Tel: 254 2 313 985-9 / \ use a condom if you _must_" ++ Anybody can win, unless there happens to be a second entry. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message