ACL and a sticky bit.

Set a directory with rwx inherit default permissions for groups, also to ensure that all files and directories crated in will have ownership the “users” group.

All new files created in the directory will have the group set to the group of the directory.

chmod g+s user1

Set the set file access control lists (ACL), set the group to rwx default and others to read access only.

setfacl -d -m g::rwx user1
setfacl -d -m o::r user1

Output:

server:/home # l user1/
total 393256
drwxr-xr-x 12 root root 4096 Jul 24 10:38 ./
drwxr-xr-x 26 root root 4096 Oct 16 15:03 ../
drwxrwsr-x+ 4 user1 users 4096 Oct 28 15:16 user1/
drwxr-xr-x 2 user2 users 4096 Oct 28 15:15 user2/
drwxr-xr-x 6 user3 dba 4096 Oct 13 14:24 user3/
drwx------ 2 root root 16384 Apr 17 2014 lost+found/

server:/home> getfacl user1/
# file: user1/
# owner: user1
# group: users
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:group::rwx
default:other::r--

server:/home/user1> l
total 72
drwxrwsr-x+ 4 user1 users 4096 Oct 28 15:36 ./
drwxr-xr-x 12 root root 4096 Jul 24 10:38 ../
-rw------- 1 user1 users 2197 Oct 28 15:14 .bash_history
drwxrw-r-- 2 user1 users 4096 Oct 27 08:43 bin/
-rw-rw-r-- 1 user2 users 0 Oct 28 15:36 createdbyuser2.txt
-rw-rw-r-- 1 user1 users 10324 Oct 21 09:22 createdbyuser1.txt
server:/home/user1>

Email Traffic Per Hour

The busiest time for the email traffic:
10:00 – 12:00 and 14:00 to 15:00

Per-Hour Traffic Summary
————————
time received delivered deferred bounced rejected
——————————————————————–
0000-0100 50 58 0 0 0
0100-0200 19 20 0 0 0
0200-0300 40 40 0 0 0
0300-0400 16 15 0 0 0
0400-0500 30 25 0 0 0
0500-0600 76 81 0 0 0
0600-0700 81 82 0 0 0
0700-0800 231 254 0 0 0
0800-0900 468 485 0 0 0
0900-1000 686 776 0 0 0
1000-1100 841 718 0 0 2
1100-1200 845 818 0 0 0
1200-1300 624 681 0 0 10
1300-1400 607 630 0 0 0
1400-1500 714 747 0 0 0
1500-1600 688 782 0 0 0
1600-1700 605 662 0 0 0
1700-1800 357 417 0 0 0
1800-1900 287 291 0 0 0
1900-2000 158 149 0 0 0
2000-2100 102 98 0 0 0
2100-2200 105 119 0 0 0
2200-2300 62 62 0 0 0
2300-2400 54 46 0 0 0

Forward queries for certain domian names to another name server.

Use a zone statement of type forward to tell a BIND server to forward queries for domain names that
end in the specified suffix to particular name servers. For example:

zone "domian.com" {
type forward;
forwarders { 172.16.12.100; };
};

This tells the name server to forward queries for domain names that end in domain.com to the name server at 172.16.12.100

How to convert bytes to KB and MB in Excel?

In Excel, to convert “bytes” from a cell D2 to KB/MB in a cell C2, insert the following to a cell C2:

=IF(D2>=1048576,D2/1000000&" MB",IF(AND(D2<1048576,D2>1024),D2/1000&" KB",D2&" BYTES"))

And then copy the formula down by dragging the bottom right-hand corner of the cell with the formula to the end of your KB/MB info already entered.

Log file for NRPE

NRPE does not have its own log file, everything goes to /var/log/messages. It would be nice to have a dedicated log file for NRPE.
To do that add the following lines in your NRPE configuration file. In my case the configuration file is /etc/nagios/nrpe.cfg

log_facility=local1
debug=0

and add the following lines to rsyslog configuration file. In my case the configuration file is /etc/rsyslogd.conf

local1.* /var/log/nrpe.log

And now, restart rsyslogd and nrep:

/etc/init.d/./rsyslogd restart
/etc/init.d/./nrpe restart