Posts Tagged Linux

Email on shutdown and restart (Linux)

The ability to know when a system shutdown (gracefully) and when it came back up can be invaluable to a System Administrator. The tips below will send out an email when a Linux system is gracefully shutdown and again when the system has restarted. This means for a single reboot the Administrator will receive two emails. This solution will not send out an email if the system loses power, however an email will still be sent on reboot. This should indicate to the Administrator that something went wrong with the shutdown. The tips below are for a Red Hat based system but should be similar in other architectures.
Read the rest of this entry »

Tags: , , ,

Send Email on Root Login

Since root should not have direct log in access via SSH and we have set up our user to use sudo, root should get logged into very rarely. In an effort to alert the System Administrator when someone logs into root, I have set up my system to send out an email on root log in.
Read the rest of this entry »

Tags: , ,

Sudo Tutorial

Aliases

Aliases are good ways to group commands together or create a shorthand version for something. There are four different kinds of aliases:  Runas aliases, User aliases, Command aliases, and Host aliases.  Aliases are very easy to define.  Simply indicate what kind of alias you’re defining, provide a name for the alias, and then provide the value for the alias.  Values can be comma-delimited when multiple values are being assigned to that alias name. The type of alias is provided using one of the following keywords.  I’ve also included a description of what exactly each alias is for.
Read the rest of this entry »

Tags: , ,