Archive for the ‘General’ Category

Another easy method that is not readily available through Google searches, and most of the how-tos out there are incorrect, yielding nothing but frustration. Here’s how to do a proper flash drive installation media for Ubuntu, or any of its derivatives – kubuntu, xubuntu, edubuntu, etc – so it can be installed on a computer without an optical drive.

Follow these steps:

  1. Download UNetbootin
  2. Download the Ubuntu ISO image for your preferred install – this was tested with 9.10 Karmic Koala
  3. Run UNetbootin, click Diskimage, and browse to select the corresponding ISO image, then select the drive letter matching the destination flash drive (BE CAREFUL HERE) and press OK. The program will extract all the files, install SYSLINUX and leave it partly ready to use. Click Exit at the end of the copy.
  4. After UNetbootin finishes, navigate to the root of the flash drive and delete the following files:
    - syslinux.cfg
    - vesamenu.c32
    - ubn* (all files starting with ubn)
  5. Copy all files fro the folder isolinux to the root of the flash drive, with the exception of isolinux.bin
  6. Rename the isolinux.cfg file to syslinux.cfg
  7. Edit the text.cfg file, and at the end of the append subsection of the install entry, add cdrom-detect/try-usb=true, so you have an option that looks like:
    append file=/cdrom/preseed/(distro).seed initrd=/install/initrd.gz quiet — cdrom-detect/try-usb=true
  8. Remove the flash drive, boot it up and reap the profits!

Very easy procedure, but there doesn’t seem to be an automated way, yet. This was tested on Windows, but should be easy to do on linux as well, since UNetbootin has a linux counterpart.

Disclaimer: I am not responsible if you destroy your data with UNetbootin.

Yes, the topic is true. You can join any XP Home machine to a domain in a few steps:

  1. Open regedit, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions
  2. Delete  the ProductSuite string
  3. Create a new DWORD entry, call it Brand
  4. Set it’s value to 0 (zero).
  5. Reboot.

What this procedure does is simulate an XP Pro environment. In some cases, it might block you from getting updates from Microsoft, but has been tested on XP SP3 and it works flawlessly.

Thanks Enrique for the tip.

Since our webserver resides on IIS here at our company (SBS 2003), I had to secure one of the websites and make sure that whomever tried to access it via HTTP was automatically and transparently transferred over to HTTPS. There’s no “1-click” way to do it in IIS, it must be done in one of 2 ways:

1) Edit the HTML files to do a redirect

2) Use a redirection website

Since there was a bunch of PHP/HTML/other files in that particular website, it seemed much simpler to just go with the second option. Here’s a rundown of the steps to do it:

  1. Open IIS Manager and select properties for the website for which you want to require SSL. For HTTP port, use anything other than 80, like 8989. For SSL port, use the default 443.
  2. Now go to the “Directory Security” tab, click Secure Communications, click Edit, check the “Require secure channel (SSL)” box and check the “Require 128-bit encryption” box too. Restart IIS. If you try to browse http://yourserver.com:8888 you should receive a “The page must be viewed over a secure channel” message. If not, something is not working properly.
  3. Now, create a new website in IIS, then name it something like “SSL redir for yourserver.com”. Choose port 80 as the HTTP port. For path, point it to anywhere in your server, like C:inetpubwwwroot (this doesn’t matter, we’re gonna change it). Give it read permissions. Now go to the properties of the newly created website, and select the “Home Directory” tab. Change “The content for this resource should come from:” to “A redirection to a URL”. In the “Redirect to:” textbox, enter https://yourserver.com. You can also optionally select “A permanent redirection for this resource”, which will cause bookmarks to update to the new URL. DO NOT select “The exact URL entered above” or “A directory below URL entered”. Restart IIS. Now try to browse to http://yourserver.com and it should redirect to https://yourserver.com automatically.

Little note: the redirect URL is sent back to the client, so if you type https://localhost as the redirect, the client browser will try to redirect to localhost on the client machine, which won’t exist. Same thing exists for NetBIOS names.

(Original source by James Kovacs, www.jameskovacs.com)

Sometimes it is much easier to simply run a command line command or batch file to perform repetitive or administration tasks. Here are some commands to help you clean that pesky IE7 history/cookies/temp/whatever files that are stored on your hard drive.

Delete Temporary Internet Files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Delete Cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Delete History
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Delete Form Data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Delete Stored Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All with the Also delete files and settings stored by add-ons options selected
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

And to make things more interesting, you can combine the numbers and get 2 or more functions at the same time, i.e.:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 9

This will delete the files (+8) and history (+1) in one single step. Now you can also create shortcuts with this and make it run every startup, or have a shortcut on Quick Launch, whatever suits you best.

If you have a dual monitor setup and wish to open 2 spreadsheets, simultaneously, one on each monitor, it’s not straightforward. Excel likes to open everything under one application window. There’s 2 approaches for this:

  1. Restore the application window, then manually resize it to occupy both monitors, but DO NOT maximize it as it will go back to one monitor only. Then open up the spreadsheets and put them side-by-side.
  2. This is the cleaner approach. You can open one spreadsheet first, maximize it to one monitor, then go to the Start Menu and hold SHIFT while clicking the Excel shortcut. This will call a second instance of the application, and you can maximize it to the second monitor. Then manually open the file.

The first approach has a nice feature attached to it which is the possibility of scroll-locking between spreadsheets, so if you’re comparing/editing data in two similar spreadsheets, makes it a bit easier.

For Windows 2003, it’s a simple registry hack:

System Key: HKEY_USERS\.DEFAULT\Control Panel\Desktop
Value Name:
Wallpaper
Data Type: REG_SZ (String Value)

Change it to the path that your BMP file resides (must be BMP) or blank it to have no wallpaper.

For Windows XP, the Fast-User switching has to be disabled, and the registry key is the same. To change the wallpaper with Fast-User switching on, a program called LogonXP has to be used.

Here’s a quick and dirty how-to on how to reset a Domain Controller password.

Disclaimer: I assume you own the machine you’re doing this procedure on. I take no responsibility whatsoever to whatever happens to you or your server. Proceed at your own risk.

First, download SRVANY and INSTSRV from here.

  1. Boot with SysRescCD or the ntpasswd live cd, reset the password for the local Administrator.
  2. Boot the machine into Directory Services Restore mode (press F8 at the start)
  3. Log in with Local Administrator, blank password
  4. Create a folder C:\nt and copy INSTSRV, SRVANY, and cmd.exe to it. If this is a Server 2008 machine, you’ll have to right-click the ZIP file and click Unblock before extracting it, otherwise Windows won’t let you do it.
  5. In a command prompt, cd to C:\nt or whatever you called it, and type instsrv PassRecovery “C:\nt\srvany.exe” adjusting the path accordingly.
  6. Start Regedit and open HKLM\System\CurrentControlSet\Services\PassRecovery
  7. Create a new subkey called Parameters and add two new values:
    name: Application
    type: REG_SZ (string)
    value: C:\nt\cmd.exe

    name: AppParameters
    type: REG_SZ (string)
    value: /k net user administrator new_password

  8. Change new_password above with a desired new password, keeping in mind password complexity policies.
  9. Open the Services applet, change PassRecovery to automatic startup.
  10. Click the Log On tab, check “Allow service to interact with desktop”
  11. REBOOT!
  12. You will not see a command prompt before logging in, but you will be able to log in with the new password.
  13. After logging in, use a command prompt with:
    net stop PassRecovery
    sc delete PassRecovery
  14. Delete C:\nt and change the admin password.

And that’s it! Easy enough..

3
Oct

Zarafa adventures

   Posted by: Dante Tags: , , , , ,

Today I decided to give Zarafa a shot, and see how it works. Currently testing on this old Ubuntu 8.04 box, recently installed but the machine is an Athlon XP 2500+ with 2 4.3Gb IDE HDDs in RAID-0 and 512Mb of PC2700 RAM.

First of all, downloaded the Zarafa community edition, AGPL3, without Outlook support. Then there’s the installation of MySQL, which the Zarafa installer does not take care of (go Synaptic!).

The installation procedure went easy, there were a few questions regarding configuration and all, just went with the defaults. The installer took care of a few dependencies, but not all as we’ll see next. Also, Zarafa uses Apache2 by default, and when starting the service, it complains about not being able to determine the server’s FQDN, so I added a ServerName entry to the /etc/apache2/apache2.conf just in case.

After the installation, it says that the Web Access interface might be available at http://localhost/webaccess but that isn’t true. Had to install the following package:

libapache2-mod-php5

After that, we have to disable the magic_quotes_gpc setting in /etc/php5/apache2/php.ini as it comes enabled by default. Then run

sudo /etc/init.d/apache2 force-reload

After that, opening http://localhost/webaccess at the server worked like a charm. Since we do not have any users configured, let’s create a John Doe user:

sudo /usr/bin/zarafa-admin -c JDoe -p jdoe-pass -e jdoe@demodomain.com -f “John Doe” -a 0

the -a 0 option is to create a non-administrator user. Now let’s create our power administrator Barry Cade:

sudo /usr/bin/zarafa-admin -c BCade -p bcade-pass -e bcade@demodomain.com -f “Barry Cade” -a 1

and bam! We can suddenly log on to the webaccess interface. It’s PHP-based, and it’s identical to MS Outlook 2003. Over the next few days I’m going to be setting up our domain demodomain.com to fully work with this Zarafa install, and be able to test it from outside.

Stay tuned…