Alright check this shit out.. I’m one of those dudes who likes to have my text editors display the line number at all times. CALL ME OLD FASHIONED! So if you want line numbers to be displayed in vi (which is really vim these days in the GNU/Linux version we’re talking about), run the following:… Continue reading Show Some Line Numbers in vim (vi) in RHEL/CentOS/Scientific Linux
Category: Tech Blogs
blog
How to Install Zabbix Server 2.0 on CentOS 6 or CentOS 5
So you probably know this already but RHEL and CentOS are basically the same, as in they have full binary compatibility. Here’s how you can install a Zabbix Monitoring Server on CentOS 5 or 6 (AKA RHEL 5 or 6). As well as installing the zabbix client side packages. FIRST! Setup the yum repo that… Continue reading How to Install Zabbix Server 2.0 on CentOS 6 or CentOS 5
PowerShell csv Reports for VMware vSphere Info via vSphere API/PowerCLI
PowerShell Script Lightning Round! This will give you reports of your vSphere VMs, Hosts and Datastores in csv files. You’ll need to have PowerCLI installed and have your Get-ExecutionPolicy set to Unrestricted. (Set-ExecutionPolicy unrestricted). Also this will need a modern Windows OS because it uses PowerShell 2.0 $VCServerName = “Your vCenter Server’s IP Address Or Hostname”… Continue reading PowerShell csv Reports for VMware vSphere Info via vSphere API/PowerCLI
Let’s Make A Menu With case in Linux/Bash!
This here bash code shows a pointless password change utility but it shows using case and what not. Enjoy! #!/bin/bash clear echo “PASSWORD CHANGE UTILITY” echo “———————–“ echo ” “ echo -n “Enter a user name:” read answer echo -n “Are you sure? (y/n):” read choice case $choice in y|Y) sudo passwd $answer clear echo… Continue reading Let’s Make A Menu With case in Linux/Bash!
Encrypt/Decrypt a File using OpenSSL
Alright so here’s the deal, you can use command line openssl to quickly (depending on the file size) encrypt a bunch of files or whatever you want. openssl enc -aes-256-cbc -pass pass:PUTAPASSWORDHERE -e -in ENCRYPTTHIS.tgz -out TOTALLY_ENCRYPTED.secret THE PASSWORD ABOVE IS IMPORTANT. You’ll need it if you intend on decrypting the data at some point:… Continue reading Encrypt/Decrypt a File using OpenSSL
Nagios CPU Average Checker for Linux and NRPE
Yo, so check out this script. It is pretty simple and basically just uses sar to check for overall CPU utilization on the system. It’s setup to work with Nagios and can be called via NRPE. Here is the syntax, which should look familiar to you, as a Nagios user: ./check_avg -w 30 -c 50… Continue reading Nagios CPU Average Checker for Linux and NRPE
PowerShell Script to Get NetApp SnapMirror Info
Note, you’ll need to install the dataontap PowerShell cmdlets first! # you’ll get an output in C:\ with all the NetApp controller IPs listed in C:\controllers.txt # this needs to be a one ip or hostname per line text file $CONTROLLERS = get-content C:\controllers.txt foreach ($CONTROLLER in $CONTROLLERS){ # make sure to change the password… Continue reading PowerShell Script to Get NetApp SnapMirror Info
Simple ARP Poisoning Check Shell Script
Note that this doesn’t really work for servers using alias IP address on a parent interface since the MAC address will be used more than once by design. Put it in cron and make sure to change the EMAIL variable: #!/bin/sh # Simple ARP Poisoning Check currentmonth=`date “+%Y-%m-%d %H:%M:%S”` logpath=”/var/log” EMAIL=me@email.com logname=”arpwatch.log” echo “ARP Poisoning… Continue reading Simple ARP Poisoning Check Shell Script
How To Setup Adito SSL VPN on CentOS 6 Minimal Install
configure eth0 – check for anything ifcfg-* kind of thing in /etc/sysconfig/network-scripts/ – edit ifcfg-eth0 BEFORE: DEVICE=”eth0″ HWADDR=”00:0C:29:B5:81:93″ NM_CONTROLLED=”yes” ONBOOT=”no” AFTER: DEVICE=”eth0″ HWADDR=”00:0C:29:B5:81:93″ NM_CONTROLLED=”no” NM_MANAGED=”no” ONBOOT=”yes” BOOTPROTO=”dhcp” NOTE: You’ll likely want to change this to a static address if this is going to be a VPN Server!!! LOL!!! #============================================= service network restart #============================================= #CONTENTS OF… Continue reading How To Setup Adito SSL VPN on CentOS 6 Minimal Install