- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Email Sys Admin every login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 02:57 AM
09-17-2004 02:57 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 03:01 AM
09-17-2004 03:01 AM
Re: Email Sys Admin every login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 03:10 AM
09-17-2004 03:10 AM
Re: Email Sys Admin every login
Still some scripting is gong to be needed to parse the info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 08:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2004 09:07 AM
09-17-2004 09:07 AM
Re: Email Sys Admin every login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2004 03:39 AM
09-19-2004 03:39 AM
Re: Email Sys Admin every login
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.
Also not every access to the system is a login. For example:
rsh -l user host command
or
ssh -l user host command
will not be considered logins and would not go through /etc/profile
Regards,
Ross
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2004 01:47 PM
09-19-2004 01:47 PM
Re: Email Sys Admin every login
echo "User $USER just logged onto $HOSTNAME" | mail -s "Login notice" root
You might want to actually route the email to an account that pops up on your screen. Perhaps your exchange account.
root gets an email in Linux every time a cron job is run if you are using the mail -s methodology.
Since its logins you are concerned with you might want to know immediately.
If you have no exchange server you can add an account for this purpose.
Since root gets so many emails it may be a good idea to segment this output.
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.
Do see that there is enough space in /var to accomodate the load.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2004 12:51 AM
09-20-2004 12:51 AM
Re: Email Sys Admin every login
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2004 01:37 AM
09-20-2004 01:37 AM
Re: Email Sys Admin every login
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2004 01:41 AM
09-20-2004 01:41 AM
Re: Email Sys Admin every login
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.
Sorry Ross. ;)
JP