executable lang ba ang permission ng script na yan?
what else?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Ina Patricia Lopez
Sent: Tuesday, June 27, 2000 9:03 AM
To: [EMAIL PROTECTED]
Subject: [myplug] Re: [plug] mail to all users


1. create a script:

#!/bin/bash
# Filename :  /etc/mail/gen-allusers
# Generate list of allusers from /etc/passwd
#
cat /etc/passwd |awk -F: '{print $1}' > /tmp/file1
egrep -f /etc/mail/exempted -v /tmp/file1| sort >
/etc/mail/allusers
rm /tmp/file1
#eof


2. create  /etc/mail/exempted:
#users that will not be included in your allusers file
#like:

root
daemon
bin
sys
adm
lp
smtp
uucp
nuucp
listen
nobody
noaccess
nobody4
setup
test
kahit_ayaw_mong_padalhan_ng_email


3. edit /etc/aliases:
# allusers group
allusers: :include:/etc/mail/allusers


4. edit your crontab file to automagically generate
allusers file.

0 0 * * * /etc/mail/gen-allusers

5. execute "newaliases"


hth,
ina patricia



> [EMAIL PROTECTED] wrote:
> #_
> #_
> #_ sirs,
> #_
> #_    How do i send mail to all users  ?
> #_
> #_
> -
> Philippine Linux Users Group. Web site and archives
> at http://plug.linux.org.ph
> To leave: send "unsubscribe" in the body to
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

-
Philippine Linux Users Group. Web site and archives at
http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

------------------------------------------------------------------------
You have to check this out and pass it along!
http://click.egroups.com/1/5998/11/_/_/_/962067987/
------------------------------------------------------------------------

To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.164 / Virus Database: 74 - Release Date: 6/8/00
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.164 / Virus Database: 74 - Release Date: 6/8/00



-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to