Win 7 reboot via Cygwin

Posted on Monday, June 24, 2013


I have an ESXi server that runs a Win-7 virtual server on it.
I use the Win 7 OS to run VSphere client so I can access the ESXi server and tweak it if necessary  (this is the cheap homebrew solution)

I run Cygwin on the win-7 machine and I use ssh to pull ports so I can attach to the server using Remote Desktop using a secure connection.



Well today I ran into an issue.  When I tried to log in I was met with this screen.




"The number of connections to this computer is limited and all connections are in use right now"


I still had Cygwin command line access to the machine so I looked around to see what I could do.






I found this post http://www.edugeek.net/forums/windows/31991-killing-remote-desktop-sessions.html [1]  wjere iser e-class suggested using the following command line commands from Cygwin (though they are really DOS commands)


>  quser


This did list the connection as still open, it also showed the ID



He also suggested using the following command to kill the session



>  logoff 2


(in my case the session id was 2 so I used 2 you may have another session ID)

And when I ran this it seemed to work, at least re-running the quser command did not bring anything up.  But when I tried to log back in I got the same results.

So I found this post  http://stackoverflow.com/questions/5104523/how-to-execute-shutdown-command-from-cygwin-in-windows [2] where a user Frankie suggested using the DOS shutdown command to reboot the server

I ran the command


>  shutdown /r /t 0


The server successfully rebooted and I was able to get in and open a Remote Desktop session.





References
[1]        Windows Thread, killing remote desktop sessions? in Technical; hi all, anyone any ideas as to how I can kill dead remote desktop sesisons?
                Accessed 06/2013
[2]        How to execute shutdown command from cygwin in windows

                Accessed 06/2013 

AWS create vsftpd (FTP) server

Posted on Friday, June 21, 2013


I recently had to create a vsftpd (FTP) server on an Amazon aws virtual server running Ubuntu 12.10.

There are some issues with the default vsftpd tool that installs with apt-get on Ubuntu 12.10 (version 2.x… not sure which one off the top of my head).   It will not allow virtual users access to their root directories.   I wrote up a guide in May-2013 that showed how to get around this by writing to a sub directory, but that just does not feel right.

So this guide will go over how to do it properly and with a virtual AWS machine.


Debt Free!

Posted on Thursday, June 20, 2013



I try to keep this blog focused and not just about what my thoughts are day to day.

But today I am making an exception.   My wife and I just had our last check to debt payments clear and we are debt free!

I just wanted to shout to the world my debt free scream  "We are debt free!"
And I gotta say it feels nice knowing I owe no one any  money.  Now, we can use the interest we used to pay banks to build wealth and give it away.


We did it following the Dave Ramsey  plan (we are big fans)



A few details for those who care to know
Since I married my wife in 2007 we have paid off  $92,469.99 in debt (and interest)
We did it on one income
Our lowest yearly income, during this time, was $38,000 and our highest is over $80,000









Creating a startup script for your play program

Posted on Tuesday, June 18, 2013


I am running a play server on Ubuntu 12.10.  I wanted to create a simple start/stop script in the /etc/init.d folder for it.

Here are the steps I took to accomplish this.


Installing Wordpress on nginx / Ubuntu

Posted on Monday, June 10, 2013


I have done several installs of wordpress using apache and php. Typically using this simple set of apt-get commands to install all the tools I need for apache/php


> sudo apt-get install apache2
> sudo apt-get install php5-mysql
> sudo apt-get install libapache2-mod-php5
> sudo apt-get install imagemagick
> sudo apt-get install php5-imagick
> sudo a2enmod rewrite


But now I am getting impressed with nginx I like the configuration files better and its overall faster than apache (or so I have been told).


Installing Swagger RESTful API documentation tool on an nginx server

Posted on Friday, June 7, 2013


Swagger is a great program for documenting your RESTful APIs.  It is made by the good folks at Reverb.  It is open source, apache license and can be found here https://developers.helloreverb.com/swagger/ [1]

Their demo page is located at http://petstore.swagger.wordnik.com/ [2]
And the git repository for this software is located at https://github.com/wordnik/swagger-core [3]

In this document I am going over setting up an nginx server, installing swagger and setting up a swagger API documents in simple static json files.  Also I want to do a simple password protection of my swagger API notes as I am currently doing this just for internal use.  (I just have never done this in nginx so I want to document it)

This was installed on Ubuntu 12.10