UNIX / Linux: Send E-mail When sudo Runs

Posted on in Categories , , , , , , , , , , , last updated July 1, 2009

I‘m not told to use the root user to perform activities that do not require it. I’ve configured sudo for myself and for other web developers so that they can restart MySQL or Apache web server. How do I send email when sudo run by one of my user? How do I keep track of user login done via sudo command?

Linux / UNIX Automatically Logout BASH / TCSH / SSH Users After a Period of Inactivity

Posted on in Categories , , , , , , , , , , , , last updated August 30, 2015

My development and testing webserver is used by over 100s of users. These users login from Windows XP, Linux, Mac OS X system via ssh. How do I set or automatically log users out after a period of inactivity under CentOS Linux server to improve server security and save some resources?

BASH Shell Redirect Output and Errors To /dev/null

Posted on in Categories , , , , , , , , , , , , , last updated February 2, 2015

How do I redirect output and errors to /dev/null under bash / sh shell scripting? How do I redirect the output of stderr to stdout, and then redirect this combined output to /dev/null device? In Unix, how do I redirect error messages to /dev/null?

BIND: Clocks are Unsynchronized Error and Solution

Posted on in Categories , , , , , , , , , , , , , , last updated February 1, 2009

Q. I’ve configured BIND named TSIG as documented here. It worked for some time, but my /var/log/messages got the errors as follows:

zone example.org/IN: refresh: failure trying master 71.22.11.22#53 (source 0.0.0.0#0): clocks are unsynchronized: 9 Time(s)
zone example.org/IN: refresh: failure trying master 71.22.11.22#53 (source 71.22.11.22#0): clocks are unsynchronized: 9 Time(s)

How do I fix these errors under Debian Linux 64 bit etch server?