<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Email Sys Admin every login in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381231#M14129</link>
    <description>Thanks for the information, I never thought of ssh. I did change the root email to be my exchange email, figured since I don't even log in much I wouldn't see any logins.&lt;BR /&gt;Thanks again!</description>
    <pubDate>Mon, 20 Sep 2004 07:51:51 GMT</pubDate>
    <dc:creator>Lisa  Mauer</dc:creator>
    <dc:date>2004-09-20T07:51:51Z</dc:date>
    <item>
      <title>Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381224#M14122</link>
      <description>Is there a way in Linux to email me user and computer name (which shows up in the /var/log/messages file) anytime someone successfully logs in to the server?  We have some Linux servers that don't really need to be logged into, the HP-UX server loads everything for them so I don't want anyone logging into them without notifying me. If they do I would like to know so I can ask what they are doing. This is a development org not production so they may need to login for different purposes but I just want to know.... I could write a script to run in cron and gather all the suyccessful logins every minute along with their computer name, but thought if there was a better way, you Linux gurus would know....</description>
      <pubDate>Fri, 17 Sep 2004 09:57:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381224#M14122</guid>
      <dc:creator>Lisa  Mauer</dc:creator>
      <dc:date>2004-09-17T09:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381225#M14123</link>
      <description>The who -um command can provide the info you are looking for. Will have parse the output to get the specific info. You script could keep a pointer record and alert you if any new entries appear.</description>
      <pubDate>Fri, 17 Sep 2004 10:01:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381225#M14123</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2004-09-17T10:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381226#M14124</link>
      <description>Doing some experimenting (RH 3.0 ES) shows that the last will do it as well. Will provide their terminal, date/time of login, from where they are, etc.&lt;BR /&gt;&lt;BR /&gt;Still some scripting is gong to be needed to parse the info.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Sep 2004 10:10:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381226#M14124</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2004-09-17T10:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381227#M14125</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;What if you just put something like this somewhere in /etc/profile?&lt;BR /&gt;&lt;BR /&gt;echo "User $USER just logged onto $HOSTNAME" | mail -s "Login notice" root&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Sep 2004 15:49:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381227#M14125</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-09-17T15:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381228#M14126</link>
      <description>John - brilliant! Thanks for all the answers, but John's idea is what I needed :)&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Sep 2004 16:07:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381228#M14126</guid>
      <dc:creator>Lisa  Mauer</dc:creator>
      <dc:date>2004-09-17T16:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381229#M14127</link>
      <description>Lisa,&lt;BR /&gt;&lt;BR /&gt;Just a quick note... Not all users run /etc/profile. For example if you have any csh or tcsh users (check /etc/passwd to see if you have any) they will run /etc/csh.login instead of /etc/profile.&lt;BR /&gt;&lt;BR /&gt;Also not every access to the system is a login. For example:&lt;BR /&gt;rsh -l user host command&lt;BR /&gt;or&lt;BR /&gt;ssh -l user host command&lt;BR /&gt;will not be considered logins and would not go through /etc/profile&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ross</description>
      <pubDate>Sun, 19 Sep 2004 10:39:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381229#M14127</guid>
      <dc:creator>Ross Minkov</dc:creator>
      <dc:date>2004-09-19T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381230#M14128</link>
      <description>While this method id pretty slick:&lt;BR /&gt;&lt;BR /&gt;echo "User $USER just logged onto $HOSTNAME" | mail -s "Login notice" root&lt;BR /&gt;&lt;BR /&gt;You might want to actually route the email to an account that pops up on your screen.  Perhaps your exchange account.&lt;BR /&gt;&lt;BR /&gt;root gets an email in Linux every time a cron job is run if  you are using the mail -s methodology.&lt;BR /&gt;&lt;BR /&gt;Since its logins you are concerned with you might want to know immediately.&lt;BR /&gt;&lt;BR /&gt;If you have no exchange server you can add an account for this purpose.&lt;BR /&gt;&lt;BR /&gt;Since root gets so many emails it may be a good idea to segment this output. &lt;BR /&gt;&lt;BR /&gt;I take it login volume is low and you're wondering why anyone would log in to the system.  If login volume is high all you're doing is filling up the mailbox in the /var filesystem. &lt;BR /&gt;&lt;BR /&gt;Do see that there is enough space in /var to accomodate the load.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Sun, 19 Sep 2004 20:47:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381230#M14128</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-09-19T20:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381231#M14129</link>
      <description>Thanks for the information, I never thought of ssh. I did change the root email to be my exchange email, figured since I don't even log in much I wouldn't see any logins.&lt;BR /&gt;Thanks again!</description>
      <pubDate>Mon, 20 Sep 2004 07:51:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381231#M14129</guid>
      <dc:creator>Lisa  Mauer</dc:creator>
      <dc:date>2004-09-20T07:51:51Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381232#M14130</link>
      <description>Ross has an interesting point, but I got curious and decided to test it out.  I setup my Linux box with the e-mail line in /etc/profile, and I connected using the 'rsh' and 'ssh' examples Ross gave.  My box sent me e-mail messages for both attempts, so it looks like they do go through /etc/profile, which kind of makes sense if you are getting a shell prompt.&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Sep 2004 08:37:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381232#M14130</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-09-20T08:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Email Sys Admin every login</title>
      <link>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381233#M14131</link>
      <description>Oops.  I shouldn't post on Monday morning before I've had my coffee!  :)&lt;BR /&gt;&lt;BR /&gt;Ross is correct.  His example just executes a command as a user, which does not execute the /etc/profile command.  Those connections are logged in /var/log/messages.  I was trying a straight login via rsh and ssh, which were getting a shell and running /etc/profile.&lt;BR /&gt;&lt;BR /&gt;Sorry Ross.  ;)&lt;BR /&gt;&lt;BR /&gt;JP&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Sep 2004 08:41:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/email-sys-admin-every-login/m-p/3381233#M14131</guid>
      <dc:creator>John Poff</dc:creator>
      <dc:date>2004-09-20T08:41:53Z</dc:date>
    </item>
  </channel>
</rss>

