Today, we at Your Nearest Bar are proud to announce our first software release, called JetScanner. It is a little utility coded in Python (tested only on 2.7) that allows scanning pages from an HP JetDirect device that has an AiO or MFP device attached to it. Currently it is only tested with the HP JetDirect 175x, or J6035B. If you’d like us to add support for other JetDirect devices, please shoot an email to somedude at yournearestbar dot com.

The code is licensed under the GPLv2 and it’s available for download at http://code.google.com/p/jetscanner/. The program has descriptive help built-in with the switch -h or –help. Current plans include changing the PDF postprocessing and adding e-mailing capabilities, so check back in the future for an updated version.

Tags: , , , , , , ,

24
Oct

Monitoring dd with a progress bar

   Posted by: Dante   in General

When using the linux utility dd, there is no visual output of the progress, how long it is going to take, or anything else. Easy to solve with the use of pv:

% pv /dev/sda | dd of=/dev/sdb bs=100M

that’ll display the amount of data transferred, the elapsed time, the throughput speed, a nice progress bar, and the ETA. For devices that do not have a fixed size, let’s say, /dev/zero, there’ll be only a throughput display.

Tags: , , , ,

15
Oct

Printing across different subnets

   Posted by: Dante   in General

When printing across different subnets, or configuring a personal firewall, certain ports need to be opened. For RAW and LPD/LPR printing, use the following:

  • TCP 9100
  • TCP 515

If printing from Microsoft Windows, the operating system will need SNMP access open as well, otherwise the printer detection procedure won’t work. Open the following port:

  • UDP 161

Make sure that the SNMP access is read-only, or that it has a strong password if read-write is really needed.

Tags: , , , , , , , , ,

22
Apr

Enabling SSH access on a Cisco router

   Posted by: Dante   in General

Let’s go through a quick and easy way to enable SSHv2 access on a Cisco router. Should be similar on a switch.

  • Make sure the IOS has the crypto modules, usually identified by a “k9″ or “k5″ in the IOS file name. Check with show version
  • Configure a hostname with the command hostname and a domain name with the command ip domain-name
  • Generate a new keypair with crypto key generate rsa and use 2048 bits
  • Create a new username for SSH access: username sshuser password 0 mysshpassword. Replace sshuser and mysshpassword accordingly.
  • Configure SSH parameters:
    • ip ssh timeout 60
    • ip ssh authentication-retries 3
    • ip ssh rsa keypair-name NAME (replace NAME with the keypair name obtained from show crypto key mypubkey rsa
  • Prevent non-SSH sessions with line vty 0 4 and transport input ssh
  • Additionally, prevent SSH access from outside a certain subnet:
    • access-list 15 permit 192.168.0.0 0.0.0.255
    • line vty 0 4
    • access-class 15 in

Now SSHv2 should be enabled and accessible. All commands should be entered in global configuration mode, except for the show commands.

Tags: , , , ,

4
Mar

Fixing Windows Media Center TV Setup

   Posted by: Dante   in General

Given certain circumstances, Windows Media Center will get stuck at “Downloading TV Setup Data” and do nothing else. This generally occurs after some sort of hardware change, as it happened to me on a motherboard change and on a hard drive change. YMMV.

For the sake of clarity, this entire post refers to Windows 7, but it could apply to Vista as well, given that the paths are relatively the same.

Anyway, there are a few posts around the Web that tell you to run a command line for mcupdate.exe with some switches. That’s like getting a tire patch, it’ll work for now but won’t last. Here’s the new tire solution:

1) Go to the Control Panel, Programs and Features, and click “Turn Windows Features on/off”. Uninstall Windows Media Center.

2) Reboot.

3) Empty out the folder C:\ProgramData\Microsoft\eHome\

4) Go to the features and enable Windows Media Center again.

5) Run Windows Media Center and do the TV setup.

This solution is the only one that worked across reboots and allowed me to go and reset the TV signal without hassle. Please leave a comment if something else worked for you.

Tags: , , , , , ,

Today I’ve decided to give OpenSolaris a spin, and to my surprise, it doesn’t have the SmartArray drivers available by default. Took some considerable amount of research to come up with a procedure to do the install. Here are the steps:

  1. Download the SmartArray drivers for Solaris on the HP website (at the time of writing, I installed OpenSolaris 2009.06 and used drivers for Solaris 10)
  2. Uncompress the package with gunzip.
  3. Inside the newly uncompressed folder, there will be a file called CPQary3.pkg. First run pfexec touch /ADD_DRV_IGNORE_ROOT_BASEDIR then run pfexec pkgadd -d ./CPQary3.pkg in the folder with the uncompressed files. There will be some errors installing the man page, but those should be ignored. The driver will be successfully installed.
  4. Run the Device Driver Utility. Right click the Smart Array controller, go to Show Details. Make note of the node name of the controller, which was pcie11,409a in my case.
  5. Run pfexec add_drv -c scsi -i ‘”pcie11,409a”‘ cpqary3 while substituting it for the correct node name in your case. It shouldn’t give any errors. Please note that the node name has a single quote followed by a double quote.
  6. Run the OpenSolaris Installer, and it should detect your arrays.

Overall it’s an easy process, and it amazes me that the default image does not include this driver. Good luck with the install. Questions are welcome in the comment area.

Tags: , , , , , ,

25
Apr

Windows System Image Restore and Intel RAID volumes

   Posted by: Dante   in General

Scenario:

Computer has 4 hard drives, two in RAID-0 and 2 independent disks. RAID-0 contains two partitions, C: and D:. One of the drives started failing, needing replacement, and then a backup was done using Windows System Image Backup, included with Windows 7. Recovery DVD was generated t oboot the computer.

All fine and dandy, the failing HDD was replaced. Another RAID-0 volume was created, and proceeded to boot the recovery DVD. After following the steps and making sure to exclude the independent disks from the restore process, the backup says that there are no valid volumes present. Tried downloading the latest Intel drivers, no go. Tried going with all independent disks, the DVD wouldn’t even boot. After some time playing around and fearing for the data, here’s a few tips to have a successful experience:

  1. Make sure to label the new RAID-0 volume *exactly* as it was before. The default is Volume0, and it *has* to be the same for the restore to work;
  2. Disconnect any and all hard drives that you don’t need. In this procedure, there were two independent disks, one had the image backups, the other was for regular data storage. Had to disconnect the second independent disk for the restore to work.

In a nutshell, the procedure works fine, despite the majority of people going to Acronis (I agree it’s a much more reliable solution) for this image backup. Following the 2 simple tips mentionded before, the backup will restore and the drives will be the same as before. As always, make sure to have regular data backups in place!

Tags: , , , , ,

With Microsoft Exchange 2007, there is a default policy that enforces the use of a 4 digit passcode (PIN) to unlock the phone. Here’s how to make the passcode optional to the user:

  1. Login to a machine with the Exchange Management Tools installed
  2. Open the Exchange Management Console
  3. Expand the Organization Configuration
  4. Click on Client Access and then choose the password tab
  5. Remove the check from the box that says Require Password

Afterwards, do a manual sync with the phone, then disable the passcode under Settings / General / Passcode Lock.

Tags: , , , , , ,

13
Apr

Recovering MS Outlook address autocomplete data

   Posted by: Dante   in General

When migrating users between different computers, most people end up just copying their files on the desktop, my documents folder, etc, and forget the little things like the database that stores the previously emailed addresses in Microsoft Outlook. I’ve seen in a lot of cases, folks that rely almost exclusively on this database to know other people’s email addresses. Here’s how to copy it from one computer to the other:

In Windows Explorer, navigate to

C:\Documents and Settings\%USERNAME%\Application Data\Microsoft\Outlook

if it’s Windows XP, or

C:\Users\%USERNAME%\AppData\Roaming\Microsoft\Outlook

if it’s Vista or 7, and copy the file with the .NK2 extension. It’s usually called Outlook.NK2 but it depends on the name of the Outlook profile used. Copy this file to the same location on the new computer.

One gotcha: if the old profile is on a domain computer, the file caches some domain information, and when sending emails internally, there will be errors. To solve this problem, manually delete the internal address entries using the “delete” key and resend an email to cache the new entry.

Tags: , , , , , ,

16
Dec

We’re on IRC!

   Posted by: Dante   in General

I’ve opened a channel on IRC for discussions regarding any of the topics posted on this blog, feel free to come in and ask questions or make comments/suggestions.

Server: irc.freenode.net
Channel: #yournearestbar

I’ll be there most of the time as VanDyke. Come in and chat!

Tags: , ,