Script for mailing /etc/passwd information
a bv
vbavbalist at gmail.com
Mon Jun 1 13:22:08 UTC 2009
Hi ,
Thanks fro the answer. Wont this mail the whole /etc/passwd file?
What about getting only the user names and the usernames shell
information?
Regards
2009/6/1, Chris St. Pierre <stpierre at nebrwesleyan.edu>:
> On Mon, 1 Jun 2009, Manuel Aróstegui wrote:
>
>> On Mon, 2009-06-01 at 16:10 +0300, a bv wrote:
>>> Hi list,
>>>
>>> I need a script which will get the users and their shell from
>>> /etc/passwd file and mail it to the company mail account which i use
>>> on Lotus Notes. Im not yet a scripting guy so i wanted to ask to you.
>>>
>>> Regards
>>>
>>
>> Can't you email them just using "mail -s" and using the FROM account you
>> just want?
>>
>> That would make things easier
>
> Indeed. No script is necessary:
>
> mail -s "/etc/password on `hostname`" whoever at example.com < /etc/passwd
>
> Chris St. Pierre
> Unix Systems Administrator
> Nebraska Wesleyan University
>
More information about the redhat-list
mailing list