Archive for February, 2011

Wake-On-Lan Shell Script for DD-WRT [Updated 08/2012]

I needed a way to wake up my server when I was away.  I don’t like to keep it running all day, so Wake-On-Lan was the solution for me.  I run DD-WRT as the Firmware on my router, so I knew that I could write some kind of script for it to do that for me.  Since DD-WRT already includes a Wake-On-Lan binary, I searched the DD-WRT site, and found a script that is supposed to do WOL, but it didnt really work, so I borrowed the Idea, and created my own:

Update [08/2012]:
DD-WRT now requires you to add “#!/bin/sh” to the beginning of every script, so I updated the Script Accordingly!!

Once you get the script into your router, to use it, all you have to do is type “./ <servername> and the script will handle the rest

This script looks at your dnsmasq.conf file, so if you have a DHCP reservation for your server like I do, it should be included in this file as a “static” ip adress, along with the MAC address, which is what you really need for WOL to work

Facebook Twitter Email Linkedin Digg Delicious

Auto Mounting a DFS shares on your Redhat 5 (CentOS 5) Server

Ok so the other day I wrote an article on how to mount the DFS to your Linux box, If you haven’t already read the other one, I suggest you go check it out now.  Today im going to expand on that article and explain how to Auto Mount the DFS Share.

  1. Edit /etc/fstab and add the following line:

    1. //  is my DFS Share
    2. /mnt/dfsfolder is my local mount point
    3. cifs is the file system
    4. noauto is telling the OS not to automount this mount (ill explain why later)
    5. uid sets the owner of the files in the file system
    6. credentials is the path to my credentials file
    7. workgroup is my domain name
    8. the last two 0 (zero) are the dump-freq and pass-dump, I wont get into these, google them if you like
  2. Create the above credential file, i created a file in /etc called dfs_creds.conf, the file looks like this:
  3. create an init.d script, the script should look like this:

    The reason for not auto mounting the DFS in the FSTab is because if for some reason the network connection is not ready, your server will hang waiting for the DFS, pausing the script for a few seconds will allow the server to stablish a connection and then mount the DFS share.

    Update: You dont even need the script above anymore, just setup your fstab entry as follows:

    The option _netdev is always recommended for cifs mounts in fstab. Option _netdev delays mounting until the network has been enabled.
  4. Thats all you need, this is what works for me, hope it works for you!!!
Facebook Twitter Email Linkedin Digg Delicious

Mounting DFS to RedHat Linux Enterprise 5 (CentOS 5)

Had to mount my DFS share to my Linux Server and this is how I got it done:


  1. Create mount point (in my case I made /mnt/dfsfolder)
  2. Yum Update (doesnt hurt to have the latest and greatest of everything)
  3. Yum Install Samba
  4. Yum Install samba-client-3.0.33-3.7.el5
  5. Yum Install samba-common-3.0.33-3.7.el5
  6. Yum Install Keyutils (you need keyutils, dont skip it)
  7. after all is said and done, the output of uname -a is
  8. edit /etc/samba/smb.conf and change workgorup to PINCHII-DOMAIN (you may not even need this)
  9. edit /etc/request-key.conf and add:
  10. Now try manually mounting the Share:

    (This should prompt for a password )
  11. If all goes well, then you are done
  12. If you are getting errors, I suggest you check out the system log (dmesg | tail)

And now you are done!!

Facebook Twitter Email Linkedin Digg Delicious

Citrix Web Interface 5.4 Installation ended prematurely

So I was trying to upgrade our Citrix Web Interface. 

I was trying to go from version 4.6 to 5.4 but every time I try to install 5.4 I got an error that said “Installation ended prematurely”.  Looking at the even viewer did not help either, all the event viewer recorded was: 

Um, What?

If you run the loggin option on the web interface installer “webinterface.exe -v “logfile.txt” an interesting error came up in the log, the portion of the log where the installation failed was this:

and you sit there wondering what the heck “CheckOnFat” is, well, that function is part of the a Citrix VB Script that checks the File system of the drive were the Web insterface is being installed.  Its looking to make sure you “DONT” have FAT FS.

And the reason why the check fails?


somehow this dll is not registered properly causing the installation of the Web Interface to fail.

in order to fix it

  1. Open up a CMD window
  2. CD to %Windir%\SysWOW64\
  3. run regsvr32 /u scrrun.dll to UNregister (this will probably fail)
  4. run regsvr32 scrrun.dll to register it (this will work)
  5. run the unregister again, just to make sure that the registration worked the last time
  6. re-register agian
  7. Install the Web Interface

And then you can go on with your day!!

Facebook Twitter Email Linkedin Digg Delicious

How to Create an Application Pool in IIS7 (CrystalServer2008)

Recently a Pinchii reader 🙂 sent me a message asking how I created the “CrystalServer2008” Application Pool as part of the solution in the post titled “Error 80040154 when using .Net Infoview”

What I had not realized is that I never posted the Instructions on how to Install Crystal Server on 2008 which I had promised, and hence, the Instructions on how to create the Application Pool were also never posted. Well, here is how to Create the “CrystalServer2008” Application Pool:

  • Open Up Internet Information Services (IIS) Manager
  • Expand the Entry for your server, it looks like [ServerName (Domain\User)]
  • There are two items there, 1 is “Application Pools” and the Other is “Sites”
  • Right Click on Application Pools and Select “Add Application Pool”
  • When the Wizard comes up, give it a Name, in this Case “CrystalReports2008”
    (the reason I give it that name, is so I know what the Application Pool is for,
    and normally I name the Application Pool Similar to the Site that hosts the Application)
  • Change Managed Pipeline to Classic
  • Now Right Click the Newly Created AppPool and Select “Advanced Settings”
  • Change “Enable 21-Bit Application” to True
  • This last step is not necessary, but I did it because I setup Kerberos Single Sign On, Change the Identity from Network, to a Domain Service Account
  • Restart the Application Pool
  • Done

Here is a Screen shot of what my Application Pool Looks like

Facebook Twitter Email Linkedin Digg Delicious
Go to Top