LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Blogs > jkzfixme
User Name
Password

Notices

Rate this Entry

send sms messages to your cell phone when someone logs in as root

Posted 12-01-2008 at 12:55 PM by jkzfixme
Updated 01-20-2009 at 09:44 AM by jkzfixme (PS)

Hi my name is Jesse and although Ive been a constant on this forum and try to answer questions when I can , Ive never been much of a blogger. However I found this trick to be pretty useful, so here it goes. You can also use the sms portion in may different contexts.
Since this is my first entry , comments and or constructive criticism would be much appreciated.



Quote:
vi .bash_profile
in the root dir

add the following at the end

Quote:
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" user@example.com
remove user@example and replace with the cell number followed by one of the following

Carrier Email to SMS Gateway
Alltel [10-digit phone number]@message.alltel.com
Example: 1234567890@message.alltel.com
AT&T (formerly Cingular) [10-digit phone number]@txt.att.net
[10-digit phone number]@mms.att.net (MMS)
[10-digit phone number]@cingularme.com
Example: 1234567890@txt.att.net
Boost Mobile [10-digit phone number]@myboostmobile.com
Example: 1234567890@myboostmobile.com
Nextel (now Sprint Nextel) [10-digit telephone number]@messaging.nextel.com
Example: 1234567890@messaging.nextel.com
Sprint PCS (now Sprint Nextel) [10-digit phone number]@messaging.sprintpcs.com
[10-digit phone number]@pm.sprint.com (MMS)
Example: 1234567890@messaging.sprintpcs.com
T-Mobile [10-digit phone number]@tmomail.net
Example: 1234567890@tmomail.net
US Cellular [10-digit phone number]email.uscc.net (SMS)
[10-digit phone number]@mms.uscc.net (MMS)
Example: 1234567890@email.uscc.net
Verizon [10-digit phone number]@vtext.com
[10-digit phone number]@vzwpix.com (MMS)
Example: 1234567890@vtext.com
Virgin Mobile USA [10-digit phone number]@vmobl.com
Example: 1234567890@vmobl.com

Regards
JKZfixme

I would also like to throw out a thanks to Ed who made the sms info known to me.
Posted in Uncategorized
Views 2544 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration