Skip to content

Instantly share code, notes, and snippets.

View jameswhite's full-sized avatar
📁
copying files

James S White jameswhite

📁
copying files
View GitHub Profile
# Description:
# If you see a PR for cfengine:lab then merge it from the source
#
# Dependencies:
# None
#
# Commands:
# hubot: merge cfengine:lab
#
# Author:
@jameswhite
jameswhite / gist:7189389
Created October 27, 2013 23:59
~/.shelldap.rc
binddn: uid=whitejs,ou=People,dc=websages,dc=com
# bindpass: MzM5MWYwZTQ0MzhmNjRiZmJlOTljYWYw
cacheage: 300
confpath: /home/whitejs/.shelldap.rc
server: ldaps://freyr.websages.com:636
timeout: 10
# Description:
# see certain words, say Zoinks!
#
# Dependencies:
# None
#
# Commands:
#
# Author:
# heathseals
@jameswhite
jameswhite / gist:7432966
Created November 12, 2013 15:36
clone2lab.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Net::LDAP;
my $prd_binddn="uid=$ENV{LOGNAME},ou=People,dc=eftdomain,dc=net";
my $prd_bindpw=$ENV{LDAP_PASSWORD};
my $lab_binddn="uid=$ENV{LOGNAME},ou=People,dc=lab,dc=eftdomain,dc=net";
my $lab_bindpw=$ENV{LDAP_PASSWORD};
@jameswhite
jameswhite / gist:7433022
Created November 12, 2013 15:39
clone2lab.pl
#!/usr/bin/env perl
use strict;
use warnings;
use Net::LDAP;
my $prd_binddn="uid=$ENV{LOGNAME},ou=People,dc=eftdomain,dc=net";
my $prd_bindpw=$ENV{LDAP_PASSWORD};
my $lab_binddn="uid=$ENV{LOGNAME},ou=People,dc=lab,dc=eftdomain,dc=net";
my $lab_bindpw=$ENV{LDAP_PASSWORD};
Create /etc/postfix/virtual and put
/.*/ blackhole@localhost
Add to /etc/postfix/main.cf
virtual_alias_maps = regexp:/etc/postfix/virtual
Add to /etc/aliases (and run newaliases)
#!/bin/sh
screencreate(){
if [ -f ~/.screenrc.${UNIQUE} ]; then
screen -S ${UNIQUE} -c ~/.screenrc.${UNIQUE}
else
screen
fi
exit 0;
}
###############################################################################
## Local Configuration: ##
## ##
## Applied aftrer default.cfg, so only overrides need be within. ##
## ##
###############################################################################
[DEFAULT]
pki_admin_password=administrator
pki_backup_password=backup
pki_client_database_password=database
whitejs@feynman:~$ cat .shelldap.rc
server: ldaps://freyr.websages.com:636
binddn: uid=whitejs,ou=People,dc=websages,dc=com
bindpass: I<3H34th'sM4M4!
basedn: dc=websages,dc=com
# tls: yes
# tls_cacert: /etc/ssl/certs/cacert.pem
# tls_cert: ~/.ssl/client.cert.pem
# tls_key: ~/.ssl/private/client.key.pem
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1