Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Loop for scripts on /etc/profile

    Posted on

    Hi everybody!

    I have a notification script on /etc/profile that mail me every bash logon, as below;

    echo 'ALERT - Root Shell Access on:'

    date
    who
    'at'
    hostname
    | mail -s "Alert: Root Access from
    who | cut -d"(" -f2 | cut -d")" -f1
    at
    hostname
    " myemail@mydomain.com

    This works fine for a long time, but suddenly just one RHEL 6.6 machine starts to message in loop, even if I'm not logged in. In a single day, more than 2.5K messages was send. This doesn't happen with others similar machines I have. I tried to move the line to a single script in /etc/profile.d/maillogin.sh and the symptoms remains.

    Any suggestions?

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat