Archive

Archive for February, 2012

Example Backup Batch Script

February 14th, 2012 Comments off

Had to whip up a batch script to backup a data location on a Server 2003 box to an external USB hard drive. Normally this is a pretty simple task, however the client wanted the backup to run nightly and to clean out existing backups older than 30 days. I figured I would share an example of the script here. I am sure there are many better ways to script this, but it was kind of spare of the moment on-site. Feel free to add corrections/suggestions in the comments.

@echo off

REM Delete backups older than 30 days
forfiles /p C:\destination /s /m *.* /d -30 /c “cmd /c del @path”
for /f “delims=” %%d in (‘dir C:\destination /s /b /ad ^| sort /r’) do rd “%%d”

REM Perform backup
set folder=%date:~10,4%%date:~4,2%%date:~7,2%
mkdir C:\destination\%folder%
xcopy /e /c /k /o C:\source C:\destination\%folder%

To get the script to run nightly I just created a “Scheduled Task” for it.

Categories: Microsoft Tags:

iFixit – Motorola Droid 4 Teardown

February 13th, 2012 Comments off

The guys and gals over at iFixit have released their teardown guide for the new Motorola Droid 4. Take a look here.

Categories: Hardware, Mobile Tags:

Reset Cisco Router Password

February 11th, 2012 Comments off

Ever been in a situation where you are on-site at a client’s location and need to get access to their Cisco router only to discover they don’t know the password? I know I have and today we are going to look at the steps to bypass and reset a Cisco router password.

First you will need a serial console connection to the router (To my knowledge there is no way to do this via telnet or ssh)

Step 1:

You will need to power off the router and power it back on. Immediately after powering the router on you will need to hit the CTRL + BREAK keys on the keyboard until you get into the ROMMON mode. You should now see the “rommon 1>” prompt.

Step 2:

In this step we are going to change the configuration register value. The default value is 0×2102, but we are going to change it to 0×2142. The 0×2142 register tells the router to ignore the startup-configuration. We do this with the following command:

rommon 1> confreg 0×2142

Now we need to reboot the router:

rommon 2> reset

After rebooting the router will boot with the initial configuration prompt type “no” to go on into the router command line.

Step 3:

Type “enable” at the command prompt to get into privileged mode. You should then see the “Router#” prompt.

Step 4:

We now need to load the startup-configuration into the running-configuration with the following command:

Router# copy startup-config running-config

Step 5:

Here we are going to go into the configuration mode and do the actual password change.

Router# configure terminal

Router(config)# enable secret yournewpassword

NOTE: At this point you can also change other passwords for telnet/ssh access, etc.

Step 6:

Lastly we need to put our configuration register back to the default value of 0×2102, save the configuration, and reboot the router.

Router(config)# config-register 0×2102

Router(config)# exit

Router# write mem

Router# reload

There you go! You now have full access to the router with a new password and the original working configuration.

PacketLife.net Community Cisco Lab

February 4th, 2012 Comments off

If you are on a tight budget and can’t afford to build your own Cisco lab then head over to PacketLife.net. They have a community Cisco lab that is free. All you have to do is register for a free account, schedule an open time slot, and get to playing. Whether your are studying for your CCNA or just want to do some pre-project simulation this site is very useful.

Here is a list of their currently available lab hardware:

    Block A

  • 1x Cisco 2811 (with 2x WIC-2T)
  • 2x Cisco 1841 (with 1x WIC-2T)
  • 1x Cisco Catalyst 3560-24
  • 1x Cisco Catalyst 3550-24 (with Inline Power)
  • 1x Cisco ASA 5505
    Block B

  • 1x Cisco 2811 (with 2x WIC-2T)
  • 2x Cisco 1841 (with 1x WIC-2T)
  • 1x Cisco Catalyst 3560G-24 (with IEEE 802.3af PoE)
  • 1x Cisco Catalyst 3550-24
  • 1x Cisco ASA 5505
  • 1x Cisco Aironet 1232AG
    Block C

  • 1x Force10 S25N
Categories: Cisco, Hardware, Networking Tags: , , , ,