The "hostname" doesn't come from the file "hosts" it comes from the file /etc/hostname, which must resolve to something with the resolver.
Pay attention to
You're not connected to mysql. Make sure you have a user called mail_admin and that your server is running -- and at that,...
apt-get install bind9
The rightmost way to accomplish this -- how i would do it, is to querry on the information_schema...
Do you need it in shell? Or can it be scripted in a real language.
You're not making sense:
This shoulden't require a script at all, you are reinventing the wheel.
Please see `man wget` and -m
All of these solutions are poor. I feel obliged to buzz in and suggest DBD::CSV.
it is vulnerable to a sql-injection attack.
pkill -u root shero
don't think so.
/etc/profile should work.
Separate names with a comma.