Google Authenticator servlet

So I am finally getting around to building a google authenticator deploy-able appliance however I almost fee like this has already been done, just have not found it.

I went back and followed my last post and build a new server, and added in tomcat.

Im able to deploy war files and a single servelet that will execute the the google authenticator and retrieve the information required, however the switching of the user is where im stuck.

While im actually running a command on the server to execute the code, its running as the tomcat service , i need to be able to change the user to run the command in the context of the user.

here is the current code for the servlet:
package com.srk.pkg;
import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import com.oreilly.servlet.ServletUtils;
// Helpful code

Recovery of data off a Netgear Ready Nas NV+ SPARC edition

Ran into an issue where the NIC got fried on my Readynas , I had backups of most of the data through USB but some data (expendable) was not backed up.
However I still wanted to recover this data and found this post:

This actually worked with a few changes:

First remove your drives from the ready nas 1 by 1, and mark on each one the number it is starting from left to right ( 1,2,3,4)
Now place them in a PC and this is probably important , put them on each sata port in order, in my case my ports are 0,1,2,3.

Download ubuntu 1604 LTS desktop IS for ease of use
Down load Rufus to convert the ISO to a bootable USB

make sure you computer has internet access

boot the linux USB , choose try Ubuntu

once booted to the desktop open up a terminal
run the following:
sudo su
gedit /etc/apt/sources.list

This will open up the graphical txt editor, Add the following line to the end of the file

deb precise m…

Access Point Gui 3.0.2 - Final

Access Point Gui 3.0.1 3.0.2

Ok so this is My last, last version of this as I am moving on to other projects.

Last Updates include:
config options for vIDM
config options for system settings.
removal of background image (it was causing long load times.
some code cleanup.

Also forgot to add a thumbprint box for vIDM
Note about auto thumbprint for vidm, this will get the thumbprint from the server however it will not add the sha value at the beginning, this is due to a framework limitation, and i dont have the time figure out a new way, so if you auto generate your thumbprint, make sure to put a 'shat1:" or "sha256:" in front before submitting.


Download Here

Access Point Gui 3.0 ( For AP 2.7.2)

Access Point Gui 3.0 ( For AP 2.7.2)

So I didn't think id write another one of these since I figured there would be one in the latest realease of AP. Well I guess they skipped any sort of Gui again, so here we go!

.NET 4.5.2 or greater
A deployed AP (just needs to be accessible via management IP)

So to start download , extract and double click the Access Point Gui.exe

Once the App has loaded you will be presented with a console 

Enter your AP's management IP or the host name and password. At this point you could continue filling out the settings but lets see what we currently have set by clicking the [Get Current Info] button.

OK Great , there are our current settings, we can copy those off some where in case we need them.

Click the View Enabled? check box to open up the rest of the settings.

Fill out the rest of the settings as required. I have added a function to get the Thumbprint for the connection server (or LB server) of the supplied certificate. After you …

VMware View 2-factor authentication with Google Authenticator - Part Four

Adding View to the Mix.
Now that we have (almost) everything setup on the Linux server side, we just need to finish the view configuration and the client portion.

Open up the View administrator, navigate to View Configuration > servers.
Select the Connection Servers tab
Select your Server and click the Edit button.

in the "Edit Connection Server Settings" pop up window, change 2-Factor authentication to RADIUS
Check enforce 2-factor and windows user name matching

On Select Authenticator Select New.

Update the fields with your information.

We are now down with the View Configuration.

download and install the google authenticator app for your device:

Now we sill set up the user to authenticate.
Open up a putty session to your ubuntu server.
su someADusername
you should now be logged in as that users
run gauth, this will generate the QR code to scann from the install app on your device.

From your device, select the…

VMware View 2-factor authentication with Google Authenticator - Part Three

Installing Google Authenticator pbis-open and freeradius
Now that we have the VM and Ubuntu installed, we now need to install our packages.

First make sure you have a DNS record for the server in active directory, as we are going to need it. This must be done first!

Also create a AD security group named:

Once done, go back to your console and run the following:
sudo su
enter your password

apt-get update

apt-get dist-upgrade
say Y when prompted

apt-get install ntp
say Y when prompted

apt-get install ntpdate
should not prompt


Now we are going to install pbis-open for our connection to Active Directory

wget -O -|sudo apt-key add - 
wget -O /etc/apt/sources.list.d/pbiso.list 
apt-get update
apt-get install pbis-open
say Y when prompted

Once that completes we can Join our Ubuntu server to the domain.
domainjoin-cli join administrator@yourd…

VMware View 2-factor authentication with Google Authenticator - Part Two

Installing Ubuntu 16.04
Now that the VM is powered on and you in the console window select English, then Install Ubuntu server.
(some times it appears that its frozen, this is just the client having issues re-drawing, close and reopen the console and your good to go)

Basic stuff here, choose English again

Select your country
don't detect keyboard layout (unless you have a non qwerty keyboard)
Finish selecting your keyboard layouts.
And wait for some stuff to load

You will be prompted to give your server a host name. Put in the FQDN you plan to use.

create a user, this is a local user so nothing fancy, and a password:

For the purpose of this demo I have chosen not to encrypt my home directory.
Select your time zone if the one that comes up is not correct.
Unless you know what your doing just use the defaults for setting up the disk.

Write your changes to the disk
Select Continue
And then Confirm.

Bunch of stuff will install.
You will be prompted for a proxy, if you do not have no s…