From owner-freebsd-questions Wed Dec 13 9:13:44 2000 From owner-freebsd-questions@FreeBSD.ORG Wed Dec 13 09:13:42 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (okc-65-26-235-186.mmcable.com [65.26.235.186]) by hub.freebsd.org (Postfix) with SMTP id C344537B400 for ; Wed, 13 Dec 2000 09:13:41 -0800 (PST) Received: (qmail 98327 invoked by uid 100); 13 Dec 2000 17:13:41 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14903.44613.362230.504308@guru.mired.org> Date: Wed, 13 Dec 2000 11:13:41 -0600 (CST) To: Odhiambo Washington , rmasse@mastery.ca Cc: questions@freebsd.org Subject: Re: email local users In-Reply-To: <79273951@toto.iv> X-Mailer: VM 6.75 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Odhiambo Washington types: > * Ryan Masse [20001213 10:54]: writing on the subject 'email local users' > =>is it possible with a single process to email every user on the box at once? > =>if so how? > > The answer is YES and this is how one user on this list adviced and it worked > for me. > > Follow these steps > > su > cd /usr/local/bin > create a file called update-userlist which contains the commands below: > #!/bin/sh > awk -F: '($3>999 && $3<65534) { print $1; }' /etc/passwd >/var/log/user.list > > save the file. > chmod +x update-userlist [etc] If all your users have homes in /home (the default), and none of the system ids have homes in /home (also the default), then you can do by with "cd /home; mail *" http://www.mired.org/home/mwm/ Independent WWW/Unix/FreeBSD consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message