July 1, 2007
How can I send emails to all users ina linux server?
- I dunno
- Hi,
I suppose on your own server.
So go to the shell, create file /tmp/email_content with the content of your e-mail and you can send it to all the people.cat /etc/passwd | cut -d: -f 1 |grep -v ^# |xargs mailx -s Subject < /tmp/email_content
As one command.
By using
cat /etc/passwd | cut -d: -f 1 |grep -v ^#
You can see the list of the users to whom you will send the mail.
Tags: linux security system, administration beginner guide linux

































