Current time: 04-18-2024, 12:43 PM Hello There, Guest! (LoginRegister)


Post Reply 
[HowTo] Receive an eMail during a SSH login
Author Message
schnere Offline
Junior Member
*

Posts: 40
Joined: Apr 2007
Reputation: 0
Post: #6
RE: [HowTo] Receive an eMail during a SSH login
(08-04-2010 08:25 PM)c0urier Wrote:  Well the way I posted it, it works in my /etc/bash.bashrc - But only when I removed the extra signs =).

Yes, it works, but not how it should work, because who | awk '{print $5}' is a shell command which only gets executed within ` signs.
With your variant you will receive emails with "who | awk '{print }'" in subject instead of the ip address.
And yes, it works in /etc/bash.bashrc , but for me in Debian Lenny /etc/bash.bashrc only gets executed on root login. Because I want to see every user login, my solution is to use /etc/profile . Just wanted to share my thoughts.

Regards, schnere
(This post was last modified: 08-04-2010 09:17 PM by schnere.)
08-04-2010 09:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HowTo] Receive an eMail during a SSH login - schnere - 08-04-2010 09:16 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)