Skip to content

Instantly share code, notes, and snippets.

View fapestniegd's full-sized avatar

James S White fapestniegd

View GitHub Profile
[jameswhite@ve ~]$ authkeys -h
USAGE: /usr/local/sbin/authkeys { -s <ldap set> | -g <ldap_posix_group> | -u <ldap_posix_uidname> } [-f outfile] [-o <owner>] [ -p <perms>]
Examples: /usr/local/sbin/authkeys -g bofh -u whitejs -f /root/.ssh/authorized_keys
/usr/local/sbin/authkeys -g bofh -g admins -u james > /root/.ssh/authorized_keys
/usr/local/sbin/authkeys -s root_authorized_keys -g admins -u james > /root/.ssh/authorized_keys
git log --pretty=oneline --reverse | while read commit comment; do
file_hash=$(git ls-tree $commit etc/fakeldap/hosts.yaml | cut -d " " -f 3 | cut -f 1);
if [ ! -z "$file_hash" ]; then
echo "$commit";
git cat-file -p $file_hash | sed -e's/#.*//' | grep . | head -1 ;
fi ;
done
EXCLUDE="\
--exclude oldstable/ --exclude stable/ --exclude testing/ --exclude unstable/ \
--exclude squeeze/ --exclude wheezy/ --exclude jessie/ --exclude sid/ \
--exclude oldstable-proposed-updates/ --exclude squeeze-proposed-updates/ \
--exclude stable-proposed-updates/ --exclude wheezy-proposed-updates/ \
--exclude testing-proposed-updates/ --exclude jessie-proposed-updates/ \
--exclude oldstable-updates/ --exclude squeeze-updates/ \
--exclude stable-updates/ --exclude wheezy-updates/ \
--exclude stable-backports/ --exclude wheezy-backports/ \
--exclude rc-buggy/ --exclude experimental/ \
# we use these defaults when nothing is specified
profiles:
lab-servers:
service: vcenter
vcenter: sol.eftdomain.net
datacenter: Nashville
cluster: EFTLAB
host: esx07.lab.eftdomain.net
resourcepool: Infrastructure
lun:
binddn: uid=whitejs,ou=People,dc=websages,dc=com
bindpass: I<3H34th'sM@m@
cacheage: 300
confpath: /home/whitejs/.shelldap.rc
server: ldaps://freyr.websages.com:636
timeout: 10
digraph trees {
subgraph ldap {
"write_setup" -> "setup-ds-admin.inf" [label = "always"];
"write_hostentry" -> "hostentry.ldif" [label = "always"];
"setup-ds-admin.inf" -> "check_adminsrv" [label = "repaired"];
"setup-ds-admin.inf" -> "check_slapd" [label = "kept"];
"hostentry.ldif" -> "check_slapd" [label = "repaired"];
"check_adminsrv" -> "slapd_initialized" [label = "repaired"];
<html>
<body>
<form>
<select onChange="if(this.selectedIndex!=0) self.location=this.options[this.selectedIndex].value">
<option value="?prnt=skrs0001" selected >prnt0001
<option value="?prnt=skrs0002">prnt0002
<option value="?prnt=skrs0003">prnt0003
</select>
</form>
</body>
#!/usr/bin/python
# Import modules for CGI handling
import cgi, cgitb
# Create instance of FieldStorage
form = cgi.FieldStorage()
# Get data from fields
first_name = form.getvalue('first_name')
#!/bin/bash
COUNT=0
while [ 1 ] ;do
ps -ef | grep sl[Aa]pd-$(hostname -s).pid
if [ $? -ne 0 ]; then
COUNT=$(expr ${COUNT} + 1)
echo "restart count: $COUNT"
cp -r /var/log/dirsrv/ /var/log/dirsrv.${COUNT}
find /var/log/dirsrv/ -type f -exec rm {} \;
/etc/init.d/dirsrv restart
################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################