Archive for the ‘Uncategorized’ Category

Removing default packages in rocks

Tuesday, June 1st, 2010

A few weeks agoI was trying to find the “rocks” way to uninstall a package included by default in the rocks installer.  I ended up calling their tech support line, and they recommended I do the following:

<package disable=”1″>mlocate</package>

I added this to my extend-compute.xml file and that stopped mlocate from being installed on my client nodes.

Issues with Printui.dll in login scripts

Wednesday, May 19th, 2010

I’ve spent a bit more time working with printui.dll to install printers, and found some interesting things:

1. Adding a printer to the machine doesn’t seem to automatically make it available to active directory accounts.  It does allow the AddWindowsPrinterConnection command from the Wscript.shell object to set up the printer.

2. It can only be run once on a machine for a given printer without giving an error, making it impractical to put into a login script for users (but possibly useful for a remote command or new machine script).

At the moment, I’m leaving it out of the login scripts and just manually adding the printers for windows 7 boxes.  If group policy managed print management in windows 2008 works out, I’ll switch to using that to set up printers instead.

Moving VMware images – ethernet card problems

Wednesday, May 5th, 2010

I had originally seen this error when I copied a vm image to a larger drive – the ethernet interface had a static I.P. but stopped working.  When I created a new interface that worked fine.  This time, I look around on the web to figure out what was happening.  It turns out that the copied images would change the mac address.  Under debian, this would cause the udev system to create a new ethernet interface for the mac address, mapped to ethX (where X is 1 plus the last network adapter it created).  By the time I started it on my new vmware server, I had two ethernet addresses, so it created two new interfaces, eth3 and eth4.  I was using eth1 for networking so changing it to eth4 enabled internet access.

In /etc/udev/rules.d/70-persistent-net.rules is where the information about the ethernet cards and their mac addresses was stored.  I compared this to the information from the .vmx config file for the virtual machine to determine what network card was mapped to each ethX interface.

Vmware server on debian 5 lenny

Wednesday, May 5th, 2010

I’ve found some interesting things out about how vmware server works on debian 5.0 . Apparently there is problem with the vmmon module throwing an error when it is higher than version 138.  Here’s the error message:

[localized] Version mismatch with vmmon module: expecting 138.0, got 168.0

Several fixes on the internet are available, which patch the source for the vmmon module to allow it to compile.  I was successful when I applied the following patch from this link:

http://www.insecure.ws/2008/07/24/vmware-anspecific-specific-557-and-kernel-2626

I applied it after the vmware-any-any-update117d patch I found here:

NEW “How to install VMWare in 2.6.26 linux kernel”

I’m actually sure if the 117d patch was required or not.  Doing a diff on the vmmon source, it appears that thevmware-update-2.26-5.5.7.tgz file adds a little perl function that determines what the vmmon version should be, to deal with the issue above.

Install procedure on fresh debian 5 machine:

  • download VMware-server-1.0.10-203137.tar.gz from vmware
  • install vmware and try to compile (fails since debian is unsupported)
  • apply vmware-any-any-update117d patch
  • get vmmon error
  • apply vmware-update-2.26-5.5.7.tgz patch and it runs

MBR FA: It pays to read the manual

Wednesday, April 28th, 2010

While I was building an installer for debian on a usb stick, I ran the following:

install-mbr /dev/sdb

To fix a problem I was having at boot.  It worked, but I then presented me with the following after booting the usb key:

MBR FA:

Some googling told me that I need to press “a” and then “1” at the next prompt to get this to boot, but reading the man page for install-mbr told me why I needed to do it in the first place (or at least a reasonable explanation for what happened).

It turns out the install-mbr command sets up a boot loader that will give you a menu if a key is pressed during startup.  My best guess is that it reads the boot menu selection as a keypress and stops the boot at the mbr prompt.  There are ways to disable this in the man page, but it isn’t worth the effort for me since I can just type a and 1 to proceed with the boot.

Using WMIC to review installed software

Friday, April 23rd, 2010

I found another way to see installed software from the command line (provided it’s been installed using a .msi installer).

From:

http://stackoverflow.com/questions/1482739/batch-script-to-get-specific-installed-software-along-with-version

List all installed Microsoft products:

  wmic product where "Vendor like '%Microsoft%'" get Name, Version

*

  List installed products that have Office in their names:

  wmic product where "Name like '%Office%'" get Name, Version

Thunderbird 3 and Message Synchronization

Friday, April 23rd, 2010

I’ve been working with Thunderbird 3 in preparation for a deployment at DGP and found an interesting quirk – the message synchronization feature basically turns imap into a cached set of files on the local drive.  Since we have quotas on the network space where is data is kept, the file sizes are a big problem (it filled my quota before syncing all the messages).  It can be configured through the gui, but I want to change the installer to change this by default.

The best option I’ve seen so far is to change the default preferences file, but I’ll need to get it into the executable installer or change it after the installation.  To that end, I created a .cmd file which does a silent install:

ECHO.
ECHO installing thunderbird
ECHO PLEASE WAIT
start /wait \\Wood\SW\Thunderbird\”Thunderbird Setup 3.0.4.exe” -ms
\\Wood\SW\DGPSWscripts\sleep.exe 5

set option=pref(“mail.server.default.autosync_offline_stores”, false);

ECHO.
ECHO installing thunderbird
ECHO PLEASE WAIT
start /wait \\Wood\SW\Thunderbird\”Thunderbird Setup 3.0.4.exe” -ms
\\Wood\SW\DGPSWscripts\sleep.exe 5

set option=pref^(“mail.server.default.autosync_offline_stores”, false)^;

IF %PROCESSOR_ARCHITECTURE%==AMD64 echo %option% >> “%PROGRAMFILES(x86)%\Mozilla Thunderbird\defaults\pref\all-l10n.js”

IF %PROCESSOR_ARCHITECTURE%==x86 echo %option% >> “%PROGRAMFILES%\Mozilla Thunderbird\defaults\pref\all-l10n.js

  • The SLEEP program is from the Windows server 2003 toolkit.  The start /wait means that the command window will pause on the installation and then edit the pref file to disable mail sync.
  • The file is in two different location depending on whether it is a 64 bit or 32 bit version of windows (the brackets cause an IF ELSE statement to fail

Fax server quirks

Tuesday, April 6th, 2010

While updating the fax server I found that running wvdialconf caused the system to stop working, probably due to the changes it made to the permissions on /dev/ttyS1, which is the port for the modem we’re using.  I was able to change the permission back to

crw——- 1 uucp dialout 4, 65 Apr  6 10:21 /dev/ttyS1

Silent command line install for Adobe CS3

Wednesday, March 24th, 2010

After reviewing the cs3 deployment guide (http://www.adobe.com/support/deployment/cs3_deployment.pdf) I decided to try a remote install of cs3 photoshop on a windows 7 computer. The installer log told me that the os version was incompatible. I found a post on a message board which recommened the following:

“In .\payloads\AdobeIllustrator13en_US and .\payloads\AdobePhotoshop10en_US there are xml files with proxy in the name. At the bottom of each file is a section which refers to Windows XP, Windows Vista and a couple of others, but it doesn’t include Windows 7 (it wasn’t about) and therefore the silent install fails because it reckons the operating system isn’t acceptable.

I did briefly try modifying the section the include Windows 7, but I rapidly got bored at guessing and just deleted the entire from both xml files.”

It appears remote installs were blocked by remotely by the uac panel. I’ll need to run a script to disable/enable it for the installs.

Using the Printui.dll to set up printers

Monday, March 1st, 2010

I’m trying out the printui.dll method to set up the printers for active directory managed machines in the lab.  It’s a stopgap measure until we install a newer version of windows server, since both 2003 R2 and 2008 have a print management system that should work with windows 7 clients.  So far, I’ve found that the following command will install a printer on a windows 7 client without having to install the print driver beforehand:

rundll32 printui.dll PrintUIEntry /ga /n\\Corman\Mom2

This command should also install the printer for all users (i.e. by computer instead of by user).  However, it looks like the printer only appears if the user already has a valid network connection to the print server.   I haven’t tried it on a windows xp client yet, so I’m interested to see what it will do in that case.