Change Floppy Drive Letter

I had to update the BIOS of a very old computer so it could handle more RAM (128MB chips were the max at the time). But I needed to create a floppy disk to do so. Plugged in my trusty USB floppy drive to my i7 machine running Windows 7 x64. Tried to run the floppy drive installation program – Not compatible with your version of windows. Damn, must need 32bit.

Moved over to the laptop with Windows 7 32bit – not a valid 32bit application. Argh. Zero for two.

Use my vmware XP Pro image – but the application requires the use of Drive A: Dammit. Zero for three.

Here’s how to change the drive letters around:

regedit
HKLM\SYSTEM\MountedDevices
Rename \DosDevices\A: to \DosDevices\Q:
Rename \DosDevices\B: to \DosDevices\A:
Rename \DosDevices\Q: to \DosDevices\B:
Reboot

Now your USB floppy should be drive A:

Lock Users To Home Directory

I needed to give access to a user (a web developer) but didn’t want them to be able to go anywhere but their home directory. The server is running Ubuntu 9.10 x32. No GUI.

A brief search found a shell called Iron Bars restricted SHell for linux (IBSH). This also allows you to prohibit certain commands from running.

wget http://downloads.sourceforge.net/project/ibsh/ibsh-binary/ibsh_debian_binary/debian_ibsh.deb?use_mirror=cdnetworks-us-1
dpkg -i debian_ibsh.deb
apt-get install -f
nano /etc/ibsh/globals.cmds

You can put whatever commands you want to allow in that file. Save it.

nano /etc/passwd
Change the shell of the user to /bin/ibsh

Login as the user and test it out. Try to cd /etc or rm -rf / and see what happens.

***EDIT***
The Link is http://downloads.sourceforge.net/project/ibsh/ibsh/ibsh-0.3a/ibsh-0.3a-i386-linuxbsd-src.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fibsh%2F&ts=1288626692&use_mirror=iweb

CentOS Install Apache

I downloaded the DVD torrent for CentOS 5.4. It’s large. 3.72GB large. It’s the i386 version.

I needed it for testing as it’s closer to RHEL than Debian is. 🙂

So I selected install – generic install – but ONLY install the server portion. I don’t need that crazy GUI. Or do I?

After installation I ran the usual:
yum update
yum -y install httpd php mysql mysql-server php-mysql
/sbin/chkconfig httpd on
/sbin/chkconfig --add mysqld
/sbin/chkconfig mysqld on

Then I started the services:
/sbin/service httpd start
/sbin/service mysqld start

Opened up my browser to the IP of the new server. Page not found. Damn.

OK, let’s see if the server can access itself:
lynx http://127.0.0.1
Command not found

Damn. Install lynx:
yum install lynx
lynx http://127.0.0.1
Default CentOS page! Yay!

Well, by default, CentOS installs SELinux. I don’t care for MAC security as this is a pure test dev machine, so I’ll remove that:
nano /etc/selinux/config
SELINUX = disabled
Save, Reboot.

Page not found. Argh, must be the default firewall crap that is on by default. I shall remove that as well:
/sbin/service iptables save
/sbin/service iptables stop
/sbin/chkconfig iptables off
I rebooted once again by accident as I hit the power button on the wrong virtual machine. Oh well.

Default CentOS Page! Yay!

Comments

I’m not a big fan of Captcha use – sometimes it’s just a pain in the buttock. But I am even more of a not-big-fan of SPAM comments. They actually serve no purpose whatsoever. About 70% of the SPAM is for a site that doesn’t exist. 10% is for sites that exist and run just fine. The other 20% is for a site that does exist, but isn’t actually in the comments section – it’s in the SPAM bot’s website. A lot of good those do, right? That means 10% of all those comments (over 400 just this year) actually work. Now it’s obvious that I have been moderating them so no one else can see, but 360 comments this year have been utter BS.

So, starting today, I finally implemented the Captcha service for signing up for new users/making comments on the site. But I also made it so that all new comments are posted without delay (hopefully), so no more moderation (also hopefully).

***EDIT***

I’ve noticed that bots are still getting through. So I made the Captcha difficulty Medium instead of Easy. I have also added XSS JAVA based blocking protocols to the site, so hopefully that curbs the SPAM a little more. I guess I’ll always have to moderate it at least a little.

Install NTP Debian or Ubuntu

I wanted a network time protocol server running on my Ubuntu server – so I could point various other computer-related items to that instead of hitting the internet.

Login as root on your Ubuntu server
apt-get remove ntpdate
apt-get install ntp
nano /etc/ntp.conf

I have the following servers in my list:

server ntp.ubuntu.com
server us.pool.ntp.org
server 10.1.0.14 (a MS domain controller)

Then under the restrict for users (at the bottom of the config file):
restrict 10.4.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.1.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.2.0.0 mask 255.255.255.0 nomodify notrap
restrict 10.3.0.0 mask 255.255.255.0 nomodify notrap

Ctrl + X
Y
/etc/init.d/ntp restart

You can see what servers are giving you data with this:
ntpq -np

You can always run ntpdate ip_of_server to update on the client side:
ntpdate 10.4.0.253

Exchange 2007 GAL/OAB

Adding a new user to exchange? Notice that the new user doesn’t show up in Outlook?

Open up the power shell on your Exchange server (or connect remotely to it), and run the following command:

Update-OfflineAddressBook "Name of Address Book"

Or

Get-OfflineAddressBook | Update-OfflineAddressBook

Then, if you’re in cached mode (most are), you can go to Tools, Send/Receive, and then select Download Address Book
Uncheck Download changes since last Send/Receive and hit OK
Now you should have the new user in your address book!

Asus O!Play Audio Is Unsupported

OK, before I get too far into things, here’s my setup:
4.5TB NAS on Gig Ethernet
Asus O!Play on Gig Ethernet

The NAS is running FreeNAS 0.7 x64 and runs at a balmy 45MB/sec usually. I’d love to upgrade to hardware RAID, but the budget constraints…
The Asus O!Play is model HDP-R1, and it’s been fully updated to the newest firmware (I think 1.22a or something along those lines – if it matters post and I’ll fix it)

I rip all of my DVDs to the NAS for instant retrieval later. I also have a bunch of my music on there also, but that doesn’t matter nearly as much (and the O!Play isn’t very good at music playing anyway). Playing DVD’s as ISOs is a very awesome feature that I use at least once a week at home. But, unfortunately, there isn’t much – if any – upscaling to DVDs on the O!Play. WYSIWYG.

But then I started to rip my Bluray collection. Let me put it this way:
DVD’s ripped: 4GB Average File Size
BD’s ripped: 22GB Average File Size

My 4050GB worth of usable space on the NAS:
DVD’s ripped: 1012.5 total movies
BD’s ripped: 184.1 total movies

You can see my $1200 NAS system will be overrun shortly if I rip too many BDs!

Oh, onto the meat of the problem. I ripped my first two BD’s and attempted to play them on the computer. ISO was not cooperating with WMplayer or VLCplayer. I could, however, select the .m2ts file (DriveLetter:\BDMV\STREAM\sometime.m2ts) and play that using VLC. So I figured I’d try to play it on the O!Play.

Playback of the ISO was simple – just select the movie per usual and it starts playing. But it will not play the true high def audio. 5.1 will play, but not truehd. Unfortunately the first movie only had English in truehd audio format. Booo.

Basically you need to take that fully awesome audio and convert it to 99% fully awesome audio. The way to do this for free:

Download TSMuxer
Unpack TSMuxer
Run tsMuxerGUI.exe
Add the .m2ts file
Under output, click the M2TS muxing radio button
Browse for location and filename to save
Click start muxing

This took roughly 15 minutes on my machine to complete.
I’m going to test either tonight or tomorrow and verify that it works, but the file was slightly smaller so maybe it did.