• Compiling SARG on Ubuntu Dapper

    By crmanski

    The version of sarg (Squid Analysis Report Generator) that comes with Dapper is a few versions behind the actually released version. This is what I did to compile on a Dapper installation that I had previously done no program compilation on…

    1. Install these packages on the command line…

      sudo apt-get install libgdchart-gd2-xpm-dev build-essential

    2. Download sarg from the website: http://sarg.sourceforge.net/sarg.php and unpack it in a directory. I did this in a terminal in my home directory…

      mkdir packages
      cd pack*
      wget
      http://umn.dl.sourceforge.net/sourceforge/sarg/sarg-2.2.3.1.tar.gz
      gzip -cd sarg-2.2.3.1.tar.gz | tar xvf –
      cd sarg*
      sudo su (this makes you root)
      ./configure –enable-sysconfdir=/etc/squid
      make && make install

    3. As root edit the /etc/squid/sarg.conf file to meet your needs…

      sudo gedit /etc/squid/sarg.conf

    4. then run sarg…

    sudo sarg

    Webmin(www.webmin.com) has a module that lets you configure the sarg report generation if you prefer a gui.


  • Deploying an Installation Package to Multiple Clients-2

    By crmanski

    Deploying an Installation Package to Multiple Clients

    When you have several machines on your network that need to have an bit of software updated it is easiest to install the software remotely. This article is going to describe the steps you can take to do this.

    PREREQUISITES:

    1. You have an NT domain(Ancient) or Microsoft Active Directory

    2. The Machine that you are installing the software on are a part of your domain.

    3. You need access to a domain account that has local administrative rights on the domain workstations. A user in the “Domain Admins” group will work or if you configure a Domain group like “ITStaff” and add it to the local administrators group on the workstations then you could use an account in that group.

    4. Sysinternals Tools from Microsoft (http://www.microsoft.com/technet/sysinternals/). Specifically psexec, which allows you to execute programs on remote machines if you have the correct permissions.

    SETUP: I am going to use a recent Adobe Reader package that I needed to install as an example.

    1. Install sysinternals: http://www.microsoft.com/technet/sysinternals/ on your server or deployment machine (You also can do this logged on to a domain workstation as an admin.)

    2. Download and put the installer in a location somewhere on a file server on the network. (EX: MyServerUpdatesAdbeRdr80_en_US.exe

    3. On the machine you are deploying from make a folder such as c:deployment. Inside this folder make two files: Adobe8Install.cmd and Adobe8-deploy.cmd

    Adobe8Install.cmd contents….

    echo “checking for Installers directory on the target…”
    if not exist %1C$installers mkdir %1C$installers
    echo “copying Adobe Reader install to install directory…”
    copy MyServerUpdatesAdbeRdr80_en_US.exe %1C$installers
    echo “Installing Adobe Reader…”
    psexec.exe %1 “c:installersAdbeRdr80_en_US.exe” /sAll /rs
    rem Removing shorcuts…
    psexec.exe %1 del “%ALLUSERSPROFILE%desktopAdobe Reader 8.lnk”
    psexec.exe %1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Speed Launch.lnk”
    psexec.exe %1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Synchronizer.lnk”
    echo “All Done.”

    Adobe8-deploy.cmd

    The easy thing to do is to export a list from Active Directory Management. Right click on the OU that has the target machines and choose export(turn off details view first) and save that file somewhere. Open is up and you will have a simple list of machines…

    machine1
    machine2
    machine3
    etc….

    In this example you would make the file look like this. Make sure it has the .cmd extension…

    @echo off

    call RemoteAdobeReaderInstall.cmd machine1
    call RemoteAdobeReaderInstall.cmd machine2
    call RemoteAdobeReaderInstall.cmd machine3

    pause

    DEPLOYMENT:

    Now all you have to do is run the Adobe8-deploy.cmd file and let it go. If a machine is powered on then you should be ok. Certain things can prevent this from working: Windows Firewall, etc, but if you have some policies in effect you should be able to contact your client machines from your domain controller at least.

    Good luck!


  • Deploying an Installation Package to Multiple Clients

    By crmanski

    Deploying an Installation Package to Multiple Clients

    When you have several machines on your network that need to have an bit of software updated it is easiest to install the software remotely. This article is going to describe the steps you can take to do this.

    PREREQUISITES:

    1. You have an NT domain(Ancient) or Microsoft Active Directory

    2. The Machine that you are installing the software on are a part of your domain.

    3. You need access to a domain account that has local administrative rights on the domain workstations. A user in the “Domain Admins” group will work or if you configure a Domain group like “ITStaff” and add it to the local administrators group on the workstations then you could use an account in that group.

    4. Sysinternals Tools from Microsoft (http://www.microsoft.com/technet/sysinternals/). Specifically psexec, which allows you to execute programs on remote machines if you have the correct permissions.

    SETUP: I am going to use a recent Adobe Reader package that I needed to install as an example.

    1. Install sysinternals: http://www.microsoft.com/technet/sysinternals/ on your server or deployment machine (You also can do this logged on to a domain workstation as an admin.)

    2. Download and put the installer in a location somewhere on a file server on the network. (EX: \MyServerUpdatesAdbeRdr80_en_US.exe

    3. On the machine you are deploying from make a folder such as c:deployment. Inside this folder make two files: Adobe8Install.cmd and Adobe8-deploy.cmd

    Adobe8Install.cmd contents….

    echo “checking for Installers directory on the target…”
    if not exist \%1C$installers mkdir \%1C$installers
    echo “copying Adobe Reader install to install directory…”
    copy \MyServerUpdatesAdbeRdr80_en_US.exe \%1C$installers
    echo “Installing Adobe Reader…”
    psexec.exe \%1 “c:installersAdbeRdr80_en_US.exe” /sAll /rs
    rem Removing shorcuts…
    psexec.exe \%1 del “%ALLUSERSPROFILE%desktopAdobe Reader 8.lnk”
    psexec.exe \%1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Speed Launch.lnk”
    psexec.exe \%1 del “%ALLUSERSPROFILE%Start MenuProgramsStartupAdobe Reader Synchronizer.lnk”
    echo “All Done.”

    Adobe8-deploy.cmd

    The easy thing to do is to export a list from Active Directory Management. Right click on the OU that has the target machines and choose export(turn off details view first) and save that file somewhere. Open is up and you will have a simple list of machines…

    machine1
    machine2
    machine3
    etc….

    In this example you would make the file look like this. Make sure it has the .cmd extension…

    @echo off

    call RemoteAdobeReaderInstall.cmd machine1
    call RemoteAdobeReaderInstall.cmd machine2
    call RemoteAdobeReaderInstall.cmd machine3

    pause

    DEPLOYMENT:

    Now all you have to do is run the Adobe8-deploy.cmd file and let it go. If a machine is powered on then you should be ok. Certain things can prevent this from working: Windows Firewall, etc, but if you have some policies in effect you should be able to contact your client machines from your domain controller at least.

    Good luck!


  • West Point Bridge Designer-2

    By crmanski

    This software is an excellent free bridge design software. It runs on Windows PCs and can be downloaded from there website: http://bridgecontest.usma.edu/ This is the description from their site: “The West Point Bridge Designer 2007 will introduce you to engineering through an authentic, hands-on design experience. This software provides you with the tools to model, test, and optimize a steel highway bridge, based on realistic specifications, constraints, and performance criteria.

    WPBD 2007 is the only version of the software that can be used to enter the 2007 West Point Bridge Design Contest.”

    If you are a network manager and want to install this on multiple machines really fast then check out this article…
    http://szone.berlinwall.org/win32/DeployinganInstallationPackagetoMultipleClients

    Technology:


  • West Point Bridge Designer

    By crmanski

    This software is an excellent free bridge design software. It runs on Windows PCs and can be downloaded from there website: http://bridgecontest.usma.edu/ This is the description from their site: “The West Point Bridge Designer 2007 will introduce you to engineering through an authentic, hands-on design experience. This software provides you with the tools to model, test, and optimize a steel highway bridge, based on realistic specifications, constraints, and performance criteria.

    WPBD 2007 is the only version of the software that can be used to enter the 2007 West Point Bridge Design Contest.”

    If you are a network manager and want to install this on multiple machines really fast then check out this article…
    http://szone.berlinwall.org/win32/DeployinganInstallationPackagetoMultipleClients

    Technology:


  • Setting Default Printers

    By crmanski

    Finding a way to have client default to the closest network printer was fairly simply after finding this post on the edubuntu mail ing list…

    https://lists.ubuntu.com/archives/edubuntu-users/2007-January/000600.html

    This post suggested editing the /etc/profile logon script and adding something like this…

    case `echo $DISPLAY | sed s/:.*$//` in

    ws004) lpoptions -d printerA;;

    ws005) lpoptions -d printerB;;

    esac

    In this example ws004 is determined by the $DISPLAY variable. This is not useful in the Ubuntu version of ltsp and it was suggested in that post that I use $SSH_CLIENT instead. So after playing around with what the $SSH_CLIENT variable gave me I realized that I am not as familiar with sed as I am awk. So after realizing that $SSH_CLIENT gives me an IP address first and then some other information. I just used awk to print out the first section of the echo command like this…

    case `echo $SSH_CLIENT | awk ‘{print $1}’` in

    192.168.0.20) lpoptions -d Room-220-Laser;;

    192.168.0.21) lpoptions -d Room-120-Laser;;

    esac

    Technology:

  • Linux, Opera: Using Multiple Profiles

    By crmanski

    At home I share the same account with different people. They have their bookmarks, favorite sites, etc nd I have mine. For a while we were using Firefox, but now we are testing out Opera (http://www.opera.com/) as a web browser. One feature of Firefox is the that allowed us to use the same account was the profiles mode feature. Well, Opera does not have this. So to workaround this I did the following…
    1. First I Created a default profile by opening Opera(In Gnome: Applications->Internet->Opera). This makes a folder in your home directory here: /home/UserName/.opera
    2. I copied that folder to two locations at the command prompt like so…

    cp /home/UserName/.opera/ /home/UserName/.operaMine
    cp /home/UserName/.opera/ /home/UserName/.operaYours

    Then I went into the Applications menu, slide down to Internet and right-clicked on opera and “add this launcher to panel” (I am using Gnome). This added the launcher icon for the default profile. To make it use the profile that I specified I right-clicked again, chose properties and changed the line…

    opera %u

    to…

    opera -personaldir /home/UserName/.operaMine

    I also changed the Text in the Name field to Mine. Change yours to whatever suits you.

    I Repeated the same for the second profile. Now when the mouse hovers over the shortcuts in the panel they identify themselves with pop up descriptive text. One good thing about this that firefox did not allow is both browser instances can be run at the same time…


  • Ubuntu – Updating Java Runtime Manually

    By crmanski

    I found that I was running a few versions behind on my linux desktop, but their was no updated package for the latest java. This is how I created a .deb package and installed it…

    The commands commands below are all in a terminal. The latest version of Java may vary by the time you are following these instructions. Change the numbers in the file names as needed…

    First I needed to install the package called “fakeroot” & “java-package”.

    sudo apt-get install fakeroot java-package

    Then I downloaded the linux installer from Sun’s site which is here…

    http://www.java.com/en/download/manual.jsp

    Change to the directory that your web browser saves to. Mine is /home/MyUserName/Downloads…

    cd ~/Downloads

    Make the file executable…

    chmod a+x jre-1_5_0_10-linux-i586.bin

    Run the fakeroot java package command…

    fakeroot make-jpkg jre-1_5_0_10-linux-i586.bin

    Follow the instructions that the installer asks you. When you are done there should be a Debian package in the same directory. Install it with this command…

    sudo dpkg -i sun-j2re1.5_1.5.0+update10_i386.deb

    Now update the systems configuration…

    sudo update-alternatives –config java

    It will say something like…

    There are 3 alternatives which provide `java’.

    Selection Alternative

    ———————————————–

    1 /usr/bin/gij-wrapper-4.0

    + 2 /usr/lib/jvm/java-gcj/bin/java

    * 3 /usr/lib/j2re1.5-sun/bin/java

    Press enter to keep the default[*], or type selection number:

    I chose #3. Your system might vary in what it lists here.

    Confirm the version. If it matches, you did well. If not find a local Linux guru and ask them for help.

    java -version

    Mine said…

    java version “1.5.0_10”

    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)

    Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing

    Thanks to this blog entry that helped me with this…

    http://www.docuverse.com/blog/donpark/2005/11/25/ubuntu-breezy-installing-java-and-eclipse


  • Firefox: Backing up your bookmarks

    By crmanski

    By Default the latest version of Firefox makes a backup of your bookmarks. The problem is that this backup is in that hard-to-find area on the hard drive under C:documents and settingsUserNameApplication Dataetc. etc. etc.(Technical data here: http://www.mozilla.org/support/firefox/profile#locate)

    So instead of trying to figure out how to find that file and back it up try out the Bookmark Backup extension located here: http://www.pikey.me.uk/mozilla/

    After installing go to Tools->Add ons (Or Extensions is your are running an old version of Firefox.) and tell it where to backup your bookmarks to. I chose a network server folder that I know will be backed up nightly.


  • OCS-NG Inventory Agent Install on Dapper Server

    By crmanski

    These are the steps I took to install the agent software from http://ocsinventory.sourceforge.net/

    All of this is done from a terminal via SSH.

    Ubutu Linux – OCSNG_LINUX_AGENT_1.0RC3 Install Notes

    Change to root…

    sudo su

    Switch to /opt…

    cd /opt

    Download the agent…(I put this on one of my webservers for convenience)

    wget http://path-to-agent.gz

    Extract Agent…

    gzip -cd OCSNG_LINUX_AGENT_1.0RC3.tar.gz | tar xvf –

    Install essential compiling tools…

    apt-get install build-essential

    Install required support software…

    apt-get install libcompress-zlib-perl libxml-simple-perl libnet-ip-perl libcrypt-ssleay-perl libwww-perl -y

    All set.

    Now run the setup

    cd OCS*

    ./setup.sh

    Technology: