This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Environment: | |
Tested with AIX 6.1 TL 8(6100-08-00-0000) and TL 6 (6100-06-01-1043) with Active Directory on 2008R2 domain controllers at the 2003 functional level. | |
Prerequisites: | |
DNS: A and PTR records for AIX host in Windows DNS server. | |
AD: Computer object matching AIX hostname in Active Directory. | |
AD: A target OU that will contain AIX objects. | |
AD: At least one “Unix enabled” user in the target OU. (Separate document) | |
AD: A service account user that will be used for LDAP binds to AD. | |
AIX: Ensure that the `hostname` command returns the FQDN of the AIX server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
#Connected - echo basic info | |
echo "# munin node at `hostname`" | |
#watchdog timestamp | |
WD_TIME=$(perl -e 'print time') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
# | |
# Sample script to gather, merge and sort mmfs.log files | |
# from nodes listed in file /tmp/gpfs.allnodes | |
# | |
# /tmp/gpfs.allnodes has been created by the user of this script | |
# and contains the host names of the nodes that the | |
# mmfs.log files are required from. No blank lines. | |
# | |
# Output file is called: /tmp/logs.sorted on node script is executes from |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ActiveDirectory | |
Import-Module SQLite #SQLite Module from http://psqlite.codeplex.com/ | |
mount-sqlite -name db -dataSource H:\Papa\bp3_aix.sqlite | |
Get-ADUser -Filter { employeeID -like "*" } -Properties uid, employeeID, sAMAccountName, sn, givenName, Name | foreach { | |
$query = 'insert into ad_dump (uid, empID, sam, sn, gn, name) values ("'+$_.uid+'", "'+$_.employeeID+'", "'+$_.sAMAccountName+'", "'+$_.sn+'", "'+$_.givenName+'", "'+$_.Name+'");' | |
Invoke-Item db: -sql $query | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SCRIPT_NAME=$(basename $0) | |
usage() { | |
cat <<EOF | |
This script will query a set of given groups from the AIX LDAP registry using the AIX command line tools (lsuser, lsgroup), and it will create | |
them locally (mkgroup, mkuser). | |
Known Bugs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Postfix stuff | |
QUEUEID (?:[A-F0-9]{11}|NOQUEUE) | |
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+ | |
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote} | |
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?) | |
#RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?:%{POSREAL:relayport}))) | |
POSREAL [0-9]+(.[0-9]+)? | |
#DELAYS %{POSREAL:a}/%{POSREAL:b}/%{POSREAL:c}/%{POSREAL:d} | |
DELAYS (%{POSREAL}[/]*)+ | |
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Updating vulscan database..." | |
cd /usr/local/Cellar/nmap/6.40/share/nmap/scripts/vulscan/ | |
rm *.csv | |
wget http://www.computec.ch/projekte/vulscan/download/cve.csv | |
wget http://www.computec.ch/projekte/vulscan/download/exploitdb.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# -*- perl -*- | |
=head1 NAME | |
spamstats - Plugin to graph spamassassin throughput | |
=head1 CONFIGURATION | |
This plugin does not have any configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: kibana | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Make sense of a mountain of logs. | |
### END INIT INFO | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat $1 | sed 's/#fields\t\|#types\t/#/g' | awk 'BEGIN {FS="\t"};{for(i=1;i<=NF;i++) printf("\x1b[%sm %s \x1b[0m",(i%7)+31,$i);print ""}' |
OlderNewer