WMI tip: Gathering WMI Data without Writing a Single Line of Code

https://technet.microsoft.com/en-us/magazine/2006.09.wmidata.aspx Can a command be your best friend? Maybe not, but it can make the job of administering Windows a whole lot easier. Writing scripts to take advantage of the power of Windows Management Instrumentation (WMI) can be intimidating, but leveraging the relatively unknown command-line interface of WMI, called WMIC, makes it easier. What is […]

How To Set Up Password Authentication with Apache on Ubuntu 14.04

https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-apache-on-ubuntu-14-04 Introduction When setting up a web server, there are often sections of the site that you wish to restrict access to. Web applications often provide their own authentication and authorization methods, but the web server itself can be used to restrict access if these are inadequate or unavailable. In this guide, we’ll demonstrate how […]

Grep tip

http://stackoverflow.com/questions/15622328/how-to-grep-a-string-in-a-directory-and-all-its-subdirectories-files-in-linux If your grep supports -R, do: grep -R ‘string’ dir/ If not, then use find: find dir/ -type f -exec grep -H ‘string’ {} +

Digging Into Exim Mail Logs With Exigrep

http://www.liquidweb.com/kb/digging-into-exim-mail-logs-with-exigrep/ Perhaps a particular domain on your cPanel server has stopped receiving e-mail. Or, an address on your domain is able to receive e-mail, except from your supplier. Maybe you can receive e-mail just fine, but are receiving error message bounce-backs from Yahoo. How are you going to get the fine-grained information you need to […]

Tar cheat sheet

Quick Cheat Sheet for TAR Archives TAR = Tape Archive but it is essentially the native linux format of creating an archive. Gzip = Compressed. Together a Gzipped Tar is the linux equivalent of a Zip. To create a gzipped TAR archive of all files in the current directory do this: tar -czvf archive.tgz * […]

Systemd kills Ossec service immediately after start

http://unix.stackexchange.com/questions/200280/systemd-kills-service-immediately-after-start Question: I’m writing systemd unit file for OSSEC HIDS. Problem is that when systemd starts service it immediately stops them. When I use that ExecStart directive all working fine. ExecStart=/var/ossec/bin/ossec-control start But when I make small improvement I fine in OSSEC logs, that it receive SIG 15 after start. ExecStart=/bin/sh -c ‘${DIRECTORY}/bin/ossec-control start’ If […]

How can I detect a DDoS attack using pfSense so I can tell my ISP who to block?

http://serverfault.com/questions/414085/how-can-i-detect-a-ddos-attack-using-pfsense-so-i-can-tell-my-isp-who-to-block Q: I am under DDoS. What can I do? : Last week my network was hit by a DDoS attack which completely saturated our 100 MBps link to the internet and pretty much shut down all the sites and services we host. I understand (from this experience as well as other answers) that I cannot handle a […]