Generating and Organizing SSL CSR

At work, even though I support Windows Servers by profession, I choose to use a Linux OS on my desktop/laptop. I have to admit that when I started at RackSpace SSL certs were not my strong suite. By now after almost a year and a half, I have had to generate a ton of SSL CSR’s for our customers so they can order certificates. Right away I found the below shell script which generates the CSR. The script was originally wrote in 2005 and required some minor updates to get it to work with newer versions of openSSL. I updated the script, and also customized it to allow for organizing the certificates based on the ticket number.

Most support jobs I have worked at use a ticketing system of some sort, so you should be able to adapt the script to your needs. My general setup is to place the shell script in a folder called SSL, when you call the script it will ask first for the ticket number you are working on, then the account number of the customer. It then asks you for the information regarding the SSL CSR (State, City, Common Name, Org, Org Unit and so on). Once done it generates the CSR, displays the output of “openssl req -in SSLCSR.csr -noout -text”, then displays the CSR and KEY for easy copy and past. It stores the files a folder named by the ticket number which it first asked. It also creates a separate sub directory called “private” which is where the private key is stored. I recommend you make the private folder read only by root, and set a low permission mask of 0644. Another addition to the script is that I had it set extended attributes on the csr and key files. This makes it easy to search for later on when a customer lost the key, or if something went wrong in when sending the customer the CSR/KEY (extra spaces’s, line breaks and such).

#!/bin/sh
# csr.sh: Certificate Signing Request Generator
# Copyright(c) 2005 Evaldo Gardenali <evaldo@gardenali.biz>
# Modified 2012 Dustin Coates <dcoates@systemoverload.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. Neither the name of the author nor the names of its contributors may
#    be used to endorse or promote products derived from this software
#    without specific prior written permission.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
# POSSIBILITY OF SUCH DAMAGE.
#
# ChangeLog:
# Tue Jan 10 16:09:00 DBC 2012 - dcoates - Changes to support newer openssl and to support other attributes. 
# Mon May 23 00:14:37 BRT 2005 - evaldo - Initial Release

# be safe about permissions
LASTUMASK=`umask`
umask 077

# OpenSSL for HPUX needs a random file
RANDOMFILE=$HOME/.rnd

# create a config file for openssl
CONFIG=`mktemp -q /tmp/openssl-conf.XXXXXXXX`
if [ ! $? -eq 0 ]; then
    echo "Could not create temporary config file. exiting"
    exit 1
fi

echo "Private Key and Certificate Signing Request Generator"
echo "This script was designed to suit the request format needed by"
echo "the CAcert Certificate Authority. www.CAcert.org"
echo

printf "Ticket Number: "
read TICKET
printf "Account Number: "
read ACCOUNT
printf "Country Code [XX]: "
read COUNTRY
printf "State [some-state]: "
read STATE
printf "City [some-city]: "
read CITY
printf "Company Name [some-company]: "
read COMPANY
printf "Department [some-department]: "
read DEPT
printf "FQDN/CommonName (ie. www.example.com) : "
read COMMONNAME

echo "Type SubjectAltNames for the certificate, one per line. Enter a 
blank line to finish"
SAN=1        # bogus value to begin the loop
SANAMES=""   # sanitize
while [ ! "$SAN" = "" ]; do
    printf "SubjectAltName: DNS:"
    read SAN
    if [ "$SAN" = "" ]; then break; fi # end of input
    if [ "$SANAMES" = "" ]; then
        SANAMES="DNS:$SAN"
    else
        SANAMES="$SANAMES,DNS:$SAN"
    fi
done

# Config File Generation

cat <<EOF > $CONFIG
# -------------- BEGIN custom openssl.cnf -----
 HOME                    = $HOME
EOF

if [ "`uname -s`" = "HP-UX" ]; then
    echo " RANDFILE                = $RANDOMFILE" >> $CONFIG
fi

cat <<EOF >> $CONFIG
 oid_section             = new_oids
 [ new_oids ]
 [ req ]
 default_days            = 730            # how long to certify for
 default_keyfile         = $HOME/${HOST}_privatekey.pem
 distinguished_name      = req_distinguished_name
 encrypt_key             = no
 string_mask = nombstr
EOF

if [ ! "$SANAMES" = "" ]; then
    echo "req_extensions = v3_req # Extensions to add to certificate 
request" >> $CONFIG
fi

cat <<EOF >> $CONFIG
 [ req_distinguished_name ]
 countryName      = AU
 countryName_default    = $COUNTRY
 countryName_min      = 2
 countryName_max      = 2
 stateOrProvinceName    = Some-State
 stateOrProvinceName_default  = $STATE
 localityName      = Some City
 localityName_default  = $CITY
 0.organizationName    = Internet Widgits Pty Ltd
 0.organizationName_default  = $COMPANY
 organizationalUnitName    = Some-Dept
 organizationalUnitName_default  = $DEPT
 commonName              = Common Name (eg, YOUR name)
 commonName_default      = $COMMONNAME
 commonName_max          = 64
 [ v3_req ]
EOF

if [ ! "$SANAMES" = "" ]; then
    echo "subjectAltName=$SANAMES" >> $CONFIG
fi

echo "# -------------- END custom openssl.cnf -----" >> $CONFIG
mkdir $TICKET
mkdir $TICKET/private
echo "Running OpenSSL..."
#openssl req -batch -config $CONFIG -newkey rsa:2048 -out $HOME/ssl/$TICKET/${COMMONNAME}_csr.pem
openssl req -batch -config $CONFIG -new -newkey rsa:2048 -nodes -out $HOME/ssl/$TICKET/${COMMONNAME}.csr -keyout $HOME/ssl/$TICKET/private/${COMMONNAME}.key
echo "Copy the following Certificate Request and paste into CAcert 
website to obtain a Certificate."
echo "When you receive your certificate, you 'should' name it something 
like ${COMMONNAME}.pem"
echo
openssl req -in $HOME/ssl/$TICKET/${COMMONNAME}.csr -noout -text
cat $HOME/ssl/$TICKET/${COMMONNAME}.csr $HOME/ssl/$TICKET/private/${COMMONNAME}.key
echo
echo The Certificate request is also available in $HOME/ssl/$TICKET/${COMMONNAME}.csr
echo The Private Key is stored in $HOME/ssl/$TICKET/private/${COMMONNAME}.key
echo

setfattr -n user.ticket -v $TICKET $HOME/ssl/$TICKET/
setfattr -n user.ticket -v $TICKET $HOME/ssl/$TICKET/${COMMONNAME}.csr
setfattr -n user.ticket -v $TICKET $HOME/ssl/$TICKET/private/${COMMONNAME}.key

setfattr -n user.account -v $ACCOUNT $HOME/ssl/$TICKET/
setfattr -n user.account -v $ACCOUNT $HOME/ssl/$TICKET/${COMMONNAME}.csr
setfattr -n user.account -v $ACCOUNT $HOME/ssl/$TICKET/private/${COMMONNAME}.key

rm $CONFIG

#restore umask
umask $LASTUMASK

Check which databases have been restored recently

A simple script I found to help see which databases have been restored recently, good thing to check if you are troubleshooting SQL 2005/2008 backup issues.

SELECT [rs].[destination_database_name], 
[rs].[restore_date], 
[bs].[backup_start_date], 
[bs].[backup_finish_date], 
[bs].[database_name] as [source_database_name], 
[bmf].[physical_device_name] as [backup_file_used_for_restore]
FROM msdb..restorehistory rs
INNER JOIN msdb..backupset bs
ON [rs].[backup_set_id] = [bs].[backup_set_id]
INNER JOIN msdb..backupmediafamily bmf 
ON [bs].[media_set_id] = [bmf].[media_set_id] 
ORDER BY [rs].[restore_date] DESC

How to reset Windows Service SDDL ACL

What is SDDL? SDDL stands for “Security Descriptor Definition Language”, the definition from Microsoft “The security descriptor definition language (SDDL) defines the string format that the ConvertSecurityDescriptorToStringSecurityDescriptor and ConvertStringSecurityDescriptorToSecurityDescriptor functions use to describe a security descriptor as a text string. The language also defines string elements for describing information in the components of a security descriptor”. Combined with some nifty tools from Microsoft it provides you with an alternate way to grant users and/or groups permission over Window Services, other then group policy. They can be tricky to master, and devastating if you mess up the SDDL string when trying to change a services ACL.

Test Case:

A user calls in with a support request, said user was trying to modify a services ACL to allow any user to stop, start, and restart a service. This user was to be used as a schedule task user. The user could not be a member of the Administrator’s group, and group policy settings were out of the question as the server was a part of a domain that he did not have control over. Long story short, the user messed up the SDDL and ended up making it where no user could even see the service in Microsoft’s Service Manager.

Attempts to reset the permissions after that resulted in the tool returning “Access Denied” error message which is to be expected. Search’s of google returned almost nothing except for one helpful post about a registry key that needed to be deleted… UN-fortionually for us that key did not exist on the server for unknown reasons.

So what to do? Every account was locked out from seeing this service, including domain and local administrator accounts. The only option in sight was to rebuild the server, or was it. Rummaging around in my head is a lot of useful, and useless information. Here is the solution I came up with which ultimately fixed the issue and made the customer happy.

The Fix:

Back in the day was tasked to access a domain who the previous domain administrator changed all the passwords before he left. The trick to doing this relies on getting access to a command prompt and other applications that are ran as and owned by the user “SYSTEM”. The windows “SYSTEM” account is the account that Windows Services, process, and tasks are run as by default, think of it as the “super admin”, or “root” if you are a Linux junkie.

The How (USE AT YOUR OWN RISK):

While this is not as complicated as task as reseting the Domain Admin account that I had to one time. It is still dangerous, because running anything as system bypass all permissions in place, you can seriously destroy your windows install if you run the wrong commands.

Windows 2003

1. The first cravat is that you have to be logged on to the console of the box, I.E equivalent of sitting in front of it. If you don’t have physical access to the machine your still in luck because Microsoft RDP supports connecting to the console, you just have to shift through the options of whatever client you are using to enable it.

2. The second step is accessing a normal command prompt

3. A. Windows 2003

Now what we need to do is to tell Windows to run a “cmd.exe” process at few minutes in the future. We do that by using the “at” command. Which you will type in your first command prompt window.

at hh:mm /interactive "cmd.exe"

Replace the hh:mm with the time you want it to run in 24 hour format, a few minutes in the future should be sufficient . Once that command runs you should be presented with a new command prompt with the default path as “C:\Windows\System32\”

3. B. Windows Vista/7/2008

In Windows Vista/7/2008 microsoft has locked down the previous way to run a command prompt as the system user, but fear not, it can be done with the below steps.

In the command prompt type the below command.

sc create systemcmd binpath= "cmd /k start" type= own type= interact"

Then:

sc start systemcmd

Basically what you are doing is creating a service which will run the command prompt when the service is start. You will then see a pop up telling you that a program is trying to interact with the desktop. When you click “View Message” your desktop will disappear and you will be presented with the command prompt that is using the system account.

4. Verify the new command prompt window is running as system. Type “whoami” and you should get the results like below.

C:\windows\system32>
NT Authority\System

5. The magic to fix the original error. Run the command below replacing “SERVICE_NAME” with the name of the effected service. The below command resets the SDDL on the service to allow “All Authenticated Users” access to the service. When the command is ran you should see it return success.

sc sdset SERVICE_NAME "D:AR(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)
(A;;LCRPWP;;;AU)(A;;CCLCSWLOCRRC;;;IU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;SY)
S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)"

6. Clean up. If you are on Windows Vista/7/2008 you can remove the service we created by issuing the below command.

sc delete systemcmd

That’s it! You should now be able to access Windows Service Manager, and see your service again. Run through your normal test to make sure it is running correctly, testing start/stop/restart.

Sources:

Microsoft SDDL Description
SDDL: Allow users to restart a service.
Running a command prompt as local system user.
Reset Windows 2003 Domain Admin Password

Officially a Racker

What is a Racker you might ask? Well a Racker is a RackSpace employee! I have been with the company for almost a month now, I was contacted by them in Sept and offered a job. It was an offer that would change my life. I was whisked away from my home, and moved to San Antonio, thrust into a new place, a new job, and a new life. I have only one thing to say…. I have never felt more privileged to work for a company, the first day you don’t believe it. The second day you still don’t believe it, the third day it finally starts sinking in. What starts sinking in you may ask? That I have been given one of the best opportunities in my life, and career working for one of the best companies on the planet.

More on RackSpace, and San Antonio later, just thought I would share that bit of information now that I finally got internet service on at my apartment. Now to go catch up on what I’ve been missing out with online for the past month. 

Dell to Acquire Boomi; Adds Industry’s No. 1 Integration Cloud™ Solution to SaaS Capabilities

Well it looks like Dell is going in to the cloud business. They have announced that they are acquire Boomi

Press Release

Date : 11/2/2010
Round Rock, Texas

Dell today announced it has agreed to acquire Software-as-a-Service (SaaS) integration leader Boomi to help businesses reap the full value of cloud computing. Powered by its revolutionary AtomSphere technology, Boomi offers the industry’s only pure SaaS application integration platform that takes the cost and complexity out of integrating applications by allowing easy transfer of data between cloud-based and on-premise applications with no appliances, no software and no coding required.

Boomi Industry Leadership

Headquartered in Berwyn, Pa., Boomi’s technology solutions are widely used with the world’s leading cloud-based applications, including Salesforce CRM, as well as marketing, financial, human resources, content management and service-desk management.

Working directly with customers and through its growing network of channel providers, Boomi manages millions of transactions a month and has completed tens of thousands of cloud integrations for hundreds of customers globally across a wide spectrum of industries.

Boomi Capabilities

Boomi’s technology benefits customers and channel partners by:

* Connecting information between existing on-premise and cloud-based applications to ensure business processes are optimized, data is accurate and workflow is reliable;
* Eliminating costs associated with inaccurate data entry;
* Increasing sales and business productivity;
* Eliminating the cost and complexity associated with integration, and
* Decreasing integration time from months to weeks.

Today’s announcement represents another step by Dell to build a technology portfolio for growing businesses seeking the benefits of web-based computing while addressing one of the top barriers to cloud adoption – managing and integrating cloud-based applications with existing applications and databases.

As businesses embrace SaaS, Boomi helps customers deploy application integrations in record time with dramatically lower costs and realize productivity and efficiency improvements over traditional models.

Terms of Dell’s acquisition of Boomi were not disclosed. The purchase is subject to customary closing conditions.

Quotes:

“For years, Dell has been working directly with our customers and SaaS leaders to understand the value cloud computing can bring and the issues customers face when contemplating this paradigm shift,” said Steve Felice, president, Dell Consumer, Small and Medium Business. “Twenty-six years ago we helped accelerate the move to client-server computing; today we’ll help drive a similar transformation with customers turning to the cloud to drive costs down and innovation up.”

“The Boomi team is thrilled to be joining the Dell family,” said Bob Moul, Boomi president and CEO. “This was a fantastic outcome for the team, our customers and partners. Dell gives us the global platform to continue to scale Boomi AtomSphere as the leading integration solution in the SaaS and cloud computing industry.”

“Dell is a pioneer in the technology industry and has embraced customer-driven innovation,” said George Hu, executive vice president, platform and marketing, salesforce.com. “With the acquisition of Boomi AtomSphere technology, Dell reinforces that role at a time when more enterprises are seeking a path to cloud computing. Dell is a key partner to salesforce.com, and we look forward to its technologies helping businesses worldwide realize the benefits of the cloud.”

“Using Boomi has driven incredible results not only for the sales team at Global Forex, but for the company at large because of the value of having a single dashboard of customer data,” said Tom Fox, Salesforce Operations Manager, Global Forex. “With AtomSphere, we were able to eliminate 95 percent of our integration costs and now have a completely transparent platform that allows us to analyze customer data real-time.”

About Boomi

Boomi is the market-leading provider of on-demand integration technology and the creator of AtomSphere®, the industry’s No. 1 Integration Cloud™. Recent Boomi awards include the 2010 SIIA CODiE for Best Application Integration Solution; the AlwaysOn OnDemand Top 100; the AlwaysOn Global 250; and the JMP Securities Hot 100. For more information, visit www.Boomi.com.

About Dell

Dell Inc. (NASDAQ: DELL) listens to customers and delivers worldwide innovative technology, business solutions and services they trust and value. For more information, visit www.dell.com.

Dell is a trademark of Dell Inc. Dell disclaims any proprietary interest in the marks and names of others.

Special note:

Statements in this press release that relate to future results and events are forward-looking statements based on Dell’s current expectations. Actual results and events in future periods may differ materially from those expressed or implied by these forward-looking statements because of a number of risks, uncertainties and other factors. Risks, uncertainties and assumptions include the possibility that expected benefits may not materialize as expected; that the transaction may not be timely completed, if at all; that, prior to the completion of the transaction, Boomi’s business may experience disruptions due to transaction-related uncertainty or other factors making it more difficult to maintain relationships with employees, licensees, other business partners or governmental entities; that the parties are unable to successfully implement the plans, strategies and objectives of management for future operations, including the execution of integration strategies; and other risks that are described in Dell’s Securities and Exchange Commission reports. Dell undertakes no obligation to update these forward-looking statements.

How To: Gyration Media Center Universal Remote Control (GYR3101CA) – Ubuntu 10.04

Difficulty: (Beginner, Intermediate, Advanced)
Mythbuntu Release: (10.04)
MythTV Release: (0.23 <)
Author: DemonBob
Last Updated: Aug. 26th, 2010

This is a How To on getting the Gyration Media Center Remote working in Ubuntu 10.04. I have had this remote since 2007, and fell in love with it. The remote is a gyro mouse and media center remote all in one. In order to get this working you have to use a program called Evrouter.

Orginal Information for getting this remote to work was gathered in this thread. [url]http://ubuntuforums.org/showthread.php?t=479897[/url]

Write Up:

Open up a terminal window.

Download EVRouter for your architecture:

i386

cd ~
wget http://debian.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_0.4_i386.deb

amd64

cd ~
wget http://debian.bedroomlan.org/debian/pool/main/e/evrouter/evrouter_0.4_amd64.deb

Install EVRouter:

i386

sudo dpkg -i evrouter_0.4_i386.deb

amd64

sudo dpkg -i evrouter_0.4_amd64.deb

Create Configuration file:

cd ~
touch .evrouterrc
nano .evrouterrc

Paste the below text.

#    Stop
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/166 "fill this in!"

#   Record
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/167 "XKey/R"

#   Pause
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/167 "XKey/P"

#   Play
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/207 "XKey/P"

#   Rewind
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/168 "XKey/Left"

#   Fast Forward
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/208 "XKey/Right"

#   Skip Back
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/165 "XKey/Home"

#   Skip Forward
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/163 "XKey/End"

#   Guide
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/362 "XKey/M"

#   Up
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/103 "fill this in!"

#   Left
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/105 "fill this in!"

#   Right
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/106 "fill this in!"

#   Down
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/108 "fill this in!"

#   Back
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/158 "fill this in!"

#   Info
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/130 "XKey/I"

#   OK/Enter
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/28 "fill this in!"

#   Volume Up
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/115 "XKey/F11"

#   Volume Down
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/114 "XKey/F10"

#   Channel Up
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/402 "XKey/Up"

#   Channel Down
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/403 "XKey/Down"

#   Mute
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/113 "XKey/F9"

#   1
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/2 "fill this in!"
#
#   2
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/3 "fill this in!"
#
#   3
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/4 "fill this in!"
#
#   4
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/5 "fill this in!"
#
#   5
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/6 "fill this in!"
#
#   6
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/7 "fill this in!"
#
#   7
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/8 "fill this in!"
#
#   8
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/9 "fill this in!"
#
#   9
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/10 "fill this in!"
#
#   0
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/11 "fill this in!"
#
#   *
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/42 "fill this in!"
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/9 "fill this in!"
#
#   #
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/42 "fill this in!"
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/4 "fill this in!"

#   Clear
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd" none key/1 "fill this in!"
#
#   Left Click
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/272 "fill this in!"
#
#   Right Click
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/273 "fill this in!"

#   Live TV
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/377 "XKey/C"

#   Windows
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/102 "XKey/Alt_L+Control_L+BackSpace"

#   Pictures
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/226 "fill this in!"
#
#   Music
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/391 "fill this in!"
#
#   Video
# "Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/393 "fill this in!"

#   DVD Menu
"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/410 "XKey/O"

Create start file.

cd /usr/local/bin
sudo touch evrouter_start.sh
sudo nano evrouter_start.sh
sudo chmod 4777 evrouter_start.sh

Paste the below into the file.


xhost +local:root
killall evrouter
rm /tmp/.evrouter* #removes a previous lock file
/usr/bin/evrouter /dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse /dev/input/by-id/usb-Gyration_Gyr
ation_RF_Technology_Receiver-event-kbd &

Create autostart file.

cd ~
cd .config/autostart
touch evrouter.desktop
nano evrouter.desktop
chmod 4777 evrouter.desktop

Paste the below text.

[Desktop Entry]
Name=Evrouter
Comment=
GenericName=Evrouter Process
Exec=/usr/local/bin/evrouter_start.sh
Type=Application
Encoding=UTF-8
Icon=
Categories=GNOME;Application;AudioVideo;Audio;Video
X-AppInstall-Package=Evrouter

Get event ID:

Run

ls -l /dev/input/by-id/

Above command should return information like below.

demonbob@sys-mythtv:/etc/udev/rules.d$ ls -l /dev/input/by-id/
total 0
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd -> ../event3
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse -> ../event4
lrwxrwxrwx 1 root root 9 2010-08-25 23:44 usb-Gyration_Gyration_RF_Technology_Receiver-mouse -> ../mouse1

Write down the event# associate with usb-Gyration_Gyration_RF_Technology_Receiver-event-kbd and usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse. In my case this is 3 and 4.

Create udev rules file.

cd /etc/udev/rules.d
sudo touch 10-local.rules
sudo nano 10-local.rules

Paste the below into terminal. Replace the event[#,#] with your corresponding numbers. Change the owner to the your user account

KERNEL=="event[3,4]", OWNER="YOUR_USERNAME"

Reboot

===Extras===

Jump Points:

Custom Scripts:

MythFrontend Close and Stop when green MCE button is pressed.

I wrote a script to make the Green MCE button to start and stop mythfrontend

1. Download the attachement labeled mce.start.sh

2. copy the file to /usr/local/bin/

3. Change the premissions of the file to executable.

sudo chmod 4755 /usr/local/bin/mce.start.sh

4. Edit your .evrouterrc for key event 102 and make it look like so. (Notice the change at the end)

"Gyration Gyration RF Technology Receiver" "/dev/input/by-id/usb-Gyration_Gyration_RF_Technology_Receiver-event-mouse" none key/102 "Shell/mce.start.sh &"

Mythfrontend swith to boxee

This is a simple replacement for the above script for if you have multiple media clients installed you can switch between them. In the code below i use boxee, but it can be modified for any combinations of applications.

if [ "$(pidof mythfrontend.real)" ] && [ "$(pidof Boxee)" ]
then
  killall mythfrontend.real
  killall Boxee

elif [ "$(pidof mythfrontend.real)" ]
then
  killall mythfrontend.real
  exec /opt/boxee/run-boxee-desktop

elif [ "$(pidof Boxee)" ]
then

  killall Boxee
else

  exec mythfrontend

fi

Manager of Information Technology

Hiya!

Well, it seems i have happened to neglect my blog yet again! Shame on me. Well I have my reasons, over the last few months, I have become Manager of IT at my company. I have been hard at work, tracking down issues from previous management. This company has went through about 8 managers in 5 years, so you can imagine how mis-matched the network is. Every IT person has his/her preference, on how the network should be setup. And with this network you can tell it’s nothing but patchwork after patchwork.

For instance, seems that no one realized that recipients policies were not running. Further more the reason they were not running was because of every server was trying to look for a domain controller that has not been apart of this network for 2 years according to the only other person here that remembers that server…. We even have servers running that he doesn’t know the purpose of!

So I have decided to rip the whole network apart and do a complete overhaul to Server 2008 across the board, and get our exchange environment up to exchange 2010. This is going to be a 60 server consolidation and upgrade, and I figure rough estimate of about 6 months to get it done. When I first started here in the IT department, a little over a year ago, I already have put the resources in place for such an upgrade. I got a VMWare ESX cluster up and running, and have decommission about 20 physical box’s. I have switched all generic web servers over to Linux. But the biggest challenge is yet to come.

To help with migrating our 600GB combined Exchange 2003 Environment, i took the liberty of acquiring a Barracuda Networks Message Archiver, and will be enforcing quota’s as of next week. The Archiver has been hard at work the last month and a half, pulling in all old email from the stores, along with PST’s we have lying around on the IT storage server. It just recently got done, this will allow me to start enforcing 2GB email quotes on users, and 4GB on Managers and Executives. Which will drop the exchange database to about 250GB’s. Much better for a move between environments, not to mention exmerge’s pesky 2GB limit… I do know that you can ‘migrate’ directly to exchange 2010, but I fear that during the previous managers reign, that the exchange stores still have a corruption in them from a dirty shutdown with circular logging on them.

Thats all for now folks, I need to get back to work!

How Logmein Ignition for the iPhone saved my Exchange 2003 Server

Time: 7:00AM

This morning I got up early to go over to my dads house to put my engine back together in one of my cars, as I was waiting for a friend to arrive who was going to give me a hand. I noticed I did not receive my normal morning e-mails, I.E. System Attendant, WSUS Server reports. On top of that my iPhone was giving me a server error when even trying to check my e-mail.

First thing I attempted was web access of course, which also gave me an error. I did not have my work laptop with me as i normally do not have any issues on a Sunday. I recently purchased logmein for the iPhone, although I have used it once or twice for simple desktop fixes for my company, I have not had a chance to use it for as something as mission critical as fixing the exchange server. I loged into a desktop at work with logmein, the preceded to use Remote Desktop to access the exchange server. Sure enough, the backup failed and the log drive filled up.

After a few choice cuss words. I was able to get all the stores mounted except two, which took longer becuase I had to do a consistancy check to repair the database to get it to mount, luckly the two stores that had problems were the archive store, and a store which houses generic service accounts of no importance for our web application. After 30 minutes of scaning and fixing the databases with exchange commands, I was able to get those two stores to mount.

All this I was able to do from my iPhone, with LogMeIn Ignition, from my dads steps leeching off his wifi. One of the best investiments I’ve made in a while. This Saved me an hour of driving to go home and get on my laptop. Best thing is, no users are the wiser about what transpired.

Site Update: New Poster + New look, Content, and Purpose coming soon!

For the other 1 person besides me that actually views this site. We have a new editor/author, a good friend of mine. You may have noticed his stories “Firestorm”, we both are hoping to revamp up the content really soon, as you have seen.

I have also started developing a new look for the site, since we have been using the same theme for 2+ years now. This theme is going to be made entirely by me, and also encompass not only wordpress but the forum i plan on opening up as soon as i can get away from my current host.

Expect more robust content, about anything and everything computer related, from software to hardware in the near future. I will also be pushing out some software reviews, and write ups about software I use daily as a System Administrator which makes my life easier.