Springwatch in School

Since Thursday, Jason and I have been working on a project to bring a little nature over to the St. Peter’s website.

I got the call on Thursday asking me if I could source a camera to take in to the school. Apparently a nest had been found outside one of the classrooms, and the school wanted a live feed.

Time was of the essence!

After having a scour around the internet, I found a cool budget camera that would fit the the bill.

The bonus of this camera is that it has infra-red for night vision, as well as sound if required.

I went along on Friday, and we hooked up the camera near the nest and armed with a sledgehammer, drill and an uneasy desire to cause carnage connected the camera to the school network and the mains.

Configuration was interesting. The IP camera allows a live feed that you can configure it with – but requires the installation of an unsigned ActiveX control (which is a pain to install because it is unsigned). Also, the FTP settings will allow you to connect to an FTP site, but not set a filename or folder. ARGH!

So some jiggery pokery came into play. I set up an FTP service in IIS 6.0 on the main server, and created a new folder for the uploaded images. After a little bit of waving in front of the camera, I found that the images were being uploaded in a sequence from when the camera is turned on. eg. cam0001.jpg, cam0002.jpg and so on.

I created a page on my own website, as the school doesn’t have direct FTP access:
index.html

<code>
<h1>St. Peter's Nestcam</h1>
<img id="camImg" src="./cam.jpg" alt="" />

The picture you are seeing is a motion-sensitive feed,
which is updated every 10 seconds. If there is little or no movement,
the picture stays the same.

Don't worry, it does change! Just take a look at another time.&lt;/p&gt;

Thanks to the bods at <a href="http://www.centaur.it/">Centaur Systems</a>
for setting this up so quickly

Back to the
<a href="http://www.st-peters-canterbury.kent.sch.uk/">school website</a>
</code>

Finally, two scripts were created to upload to FTP. I don’t have them to hand, but I’ll upload them later. I promise!

Office 2007 Deployment Computer Startup Scripts

Now that MS Office 2007 is doing the rounds, I suppose it’s time to lookat some of its shortcomings.

It has a few when it comes to deployment. The biggest nuisance being deployment.

You have four options:

  • Install it on a PC manually (not great)
  • Deploy through group policy with no customisations
  • Use a deployment system such as SMS
  • Use a computer startup script

You may as well just say “no” to the first one. Anything more than a handful of PCs and you have a tedious task.

Group Policy has always been my method of choice. Most of my clients have less than 100 PCs, so Group Policy deployment is ideal. But as pointed out in the list, you cannot customise the installation with any defaults.

SMS is out. It’s not worth explaining to clients why it’s a good idea to buy software that makes my life easier. Even though the effort and management might simplify things somewhat.

So we’re stuck with computer startup scripts. Another method I hate – but if you want to control Office Deployments, then this is the way to do it. Thankfully, Aaron Parker has posted some startup scripts to help with this using the MSP method.

If you are using a network with WSUS, then updates become a non-issue, and I think that the only time to need to redeploy is if you decide to change the application packages that you want. At which point, you could check that executables of the programs exist or record your own registry entries that you can check for.

It’s not a great method (I’ve managed to avoid having to use ANY computer startup scripts in 2000-based networks) – but there’s no reason why it shouldn’t work. Especially if you make sure to use the quiet options in the Setup /admin tool.

Office, eh?

Automated Documentation in PHP

I’ve been looking for some software to help me compile web-based documentation for a school that we work in.

What they are trying to do is write coursework modules for staff to follow, and then have them available on a site.

I know how this ends up. One of the ideas I had when they told me that they were writing modules was to put it all in word, and then generate PDFs at the end, using the headers for bookmarks in Adobe.

It was sound until I was told that there must be ‘no scrolling’, so that pupils with a 2-second timespan might be able to read it. I’m not convinced that the no-scrolling is the way to go, but I suppose it’s no better one way or another.

So, here we are. I’ve scoured the internet looking for something that will do the job nicely. I found some modules on the PEAR site that would allow me to create documentation and store links in a database. I liked the look of it, but it seemed that I might have been going a little off-track as with HTML Menu, I’d probably end up storing all of the data in HTML pages that I’d still manage and then place the menu in a database. Not fun.

Luckily, an offshoot of a PEAR project surfaced called PHP Dcoumentor while has some useful documentation (surprise, surprise), and seems to be able to generate documentation into a variety of formats from XML or DTD, which can’t be bad.

Steve was perplexed as to why we are doing this, when it means that we would have to go through everything that the tutors have written for the modules and reformat it. Ironically, if they had settled on my PDF idea in the first place, then it’s feasible that we could have used the Word styles as a starting block for the online styles.

Still, if someone wants to pay me to make documents look pretty, then I’m all for it.

Reverse Engineering Passwords

Hashing passwords is a common way to secure them in a database and make sure that they cannot be read easily.

But did you know there’s a website that reverse engineers the hashes and stores them in a searchable database?

The folks over at RedNoize have created such a site.

Obviously, there’s no better protection than keeping your databases tightly secured – but even so, it may be worth considering putting extra abstraction on passwords – just to make it that little more difficult.

Simple User Logon Logoff Logging on a Windows Domain

I like simple scripts, and this one is so obvious – I wonder why I didn’t think of it:

First, create a folder on your server, and share it as logon$. Make sure that users are given read and write access in the share properties, and in the folder security settings.

Create the following logon scripts and add them to the logon / logoff scripts as appropriate. Both scripts are ONE LINE ONLY.

logon.cmd

echo logon,%COMPUTERNAME%,%USERNAME%,%DATE%,%TIME% >> \\server1\logon$\Logon.csv

logout.cmd

echo logoff,%COMPUTERNAME%,%USERNAME%,%DATE%,%TIME% >> \\server1\logon$\Logon.csv

Once done, you can load the file into a program such as Excel and easily manipulate the data to find what you are looking for.

Naturally, change the name server1 to your server name. It’s a simple way to log users accessing workstations so that you know who as logged on where.

I was considering doing the same with a database and VBscript – which would inevitably slow down the logon process. This should make things wonderfully simple.

I settled on keeping the log file the same for logons and logoffs, as it seems sensible to track these in the same file. If you seperate them and say, want to find out how long a user has been logged on for, then you have to start dealing with too many seperate files.