The Blog of Justin Loutsch

I don't know the question, but the answer is 42!


I'm Justin, and I live in Boston. I'm a huge geek into process automation and work reduction, and am also an editor at Eat Your Serial. Thanks for dropping by!

Recently a change happened to one of our servers at work which caused sudo to fail completely.

When we ran the sudo command, here’s what we’d see:

sudo vi /etc/samba/smb.conf
Sorry, try again.
Sorry, try again.
Sorry, try again
sudo: 3 incorrect password attempts

All we had to do in this case was hit enter after the command and we would not even have the chance to enter the password before the sudo command failed.

I did some extensive googling and only found one useful result, so I’m posting my experience here to provide one more hit for future encounters of this problem.

It turns out that the Pam config file had a line commented out which caused this error.

The file in question: etc/pam.d/system-auth

What our file looked liked:

# User changes will be destroyed the next time authconfig is run.
auth required
auth sufficient
#auth sufficient nullok try_first_pass
auth sufficient try_first_pass
auth requisite uid >= 500 quiet
auth sufficient use_first_pass
auth required

See that third line beginning with #auth? That’s the problem right there.

We removed the # symbol so the system could read the line and restarted the SSH daemon (service sshd
restart) and were regained sudo access immediately afterwards.

Coherence movie review

January 6th, 2015

So I’ve watched a movies lately. It’s been cold.

Actually there was a reddit thread about movies that are a “mind fuck.”

So I watched this movie and enjoyed it but I ended up wondering 2 things HERE COME SPOILERS

Read the rest of this entry »

I recently watched the movie Predestination which raised some questions for me that I felt coudl have ended the entire movie about halfway through.

Spoiler alert, so you’ll have to click the ‘more’ link to read the rest below.
Read the rest of this entry »

MFP M177fw Scanner Error 22

March 31st, 2014

I recently bought a shared printer for work and this error appeared, after much googling, I found forum posts from HP with a bunch of people requesting that some mod also send them the solution in a PM.

I made an account and requested that the mod post the solution publicly, but this is apparently against HP policy.

They claim this is due to this method being a last resort which can brick the device, so I take no responsibility for anything that happens to your printer.

Without further ado, here is the solution to HP MFP scanner error 22:

Make sure the printer is connected directly to a wall outlet.

Laserjet 177fw Reset.

This will reset the printer back to factory settings. You would have to configure the network over again.

Turn the printer off. On right side of the display.

Hold your thumb in the bottom right corner inside the screen.

Power on the printer.

Wait till permanent storage appears and remove your thumb off the display.

If you are still having issues, I would call HP Tech Support and inquire about a replacement printer.

Contact HP Worldwide.

Salsa dancing!

November 19th, 2013

I’ve been taking salsa lessons since June in an effort to get myself out of the house and meet some new people. It all started with a deal from amazon local, along with cheap swing dancing tickets from the Boston phoenix. I went swing dancing once in an old factory showroom with no air conditioning on a 95 degree Friday evening and decided I never wanted to go to that building again. Maybe in the winter?

Salsa was a whole new story. It was hot there at first also but they got air conditioning pretty quickly. I enjoy the instructors a lot, they’re very helpful and fun. There’s definitely a difference between them. The instructors are Lili, Roberto, and Stefanie. When I dance with Lili she tells me to relax and have fun, and Stefanie just yells the count at me to make sure I don’t miss a beat. My training as a trombone player in band class has finally paid off and helps me keep the beat, and also get back on track when I miss one.

Over the summer I’ve progressed from beginner to advanced beginner, and am now in training group level 1. Every Monday after class there’s a social dance where we get to dance with people from all levels as well as those from the community who want to come dance for free (as far as I know, the only place where you can dance salsa for free). That’s a great opportunity for us to practice the combinations we just learned as well as others, and to get to know each other more as well.

I was going dancing every Friday night over the summer as well, even took my mom when she came to visit. I didn’t know as much then and it was harder to help her learn then but I’ve promised her more lessons over Christmas. I had to cut down on the number of times I was dancing due to developing a bit of tendonitis, and I also bought some new balance shoes with thicker soles that my feet can bend as much, which I’m happy to say have helped a lot. I have another class Wednesday night and am going dancing again on Friday.

Thursday night, I have my 2nd bachata class!

And now, I’ll leave you with a video of me and my partner dancing. This was taken a couple months ago now, so just imagine I’m even better now :)

Just make sure to turn the volume down low on your device, this video was recorded near the speakers and it’ll be very loud.

Here’s another informative post being added for posterity in the hopes it will help others. I was able to find precious little on the internet about setting up these devices.

My company has recently opened a new headquarters, complete with a lab of several different functions. My job as network administrator was to make sure the technology moved smoothly without incident from old location to new, and then once that was done to make sure the scientists were well supported with their scientific equipment.

Our new chemist facilitated the sale of his machines from his former company and brought them with him, but was not the one to set them up for functionality. I’ve never worked in lab setting and these machines were brand new to me. The machines themselves are somewhat old, and the software even older (our current copy being written in 1996 I believe). We could get a new and updated copy of the software, but it would easily cost $6000-$7000.

He suggested to me we would need older machines to run the software, but I was confident that compatibility mode would handle the software fine. What I didn’t count on was the machine have RS-232 serial cables. Turns out I was wrong on that count, and installing the software on Windows 8 prevented the system from booting properly, loading only a taskbar with an invisible clock and a lenovo button. Safe mode worked fine but even uninstalling the software didn’t fix this issue. I ended up using lenovo’s one click restore solution to reset the laptops to factory defaults.

Next up: VirtualBox with windows XP. Software installed successfully, and I’d received a few different USB to RS232 serial cable adapters but still it didn’t work. After taking a closer look at the back panels of these machines, I realized there are ethernet ports on the controllers which means they can be made available on the network. Called up the manufacturer and was connected with a technical support chemist who walked me through accessing the IP address settings. Turns out the easiest way to ensure the IP addresses are correct is to reset the device to defaults using the depressed black buttons on the back of both controllers (near the ethernet ports). The default IP addresses of the controllers are and This can be checked by cycling through the menus of the “func” button until the IP address appears.

Next up: plug the ethernet cables from both controllers into a network hub, and plug the laptop into the ethernet hub. If using Virtualbox, pass the ethernet port through to the Guest OS. You may need a second NIC or a wireless adapter to get internet access, but I don’t see any harm in plugging another cable into the hub and the wall to get a network connection that way.

My experience with the software will vary greatly from any other due to the age of the software but in the configuration menu you would then add in the IP addresses of both machines and run a short test to ensure that the machines can talk to one another.

I owe a huge debt of thanks to technical support chemist at Shimadzu for not only providing the solution to this setup, but also for being proactive and calling back several times to make sure he got a hold of me.

This is a general informational post meant for those dealing with similar problems.

I really ran into 2 problems with this setup, so let’s start with the networking first. The scanner worked fine over the wireless network, but I had to reset the router since it was set to work as an AP, and we needed the router capabilities to add a guest network.

Setting this router (ASUS RT-N66U) to router mode enabled 2 separate subnets, one for WAN and one for LAN, which gave the printer the IP address 192.168.2.x instead 192.168.1.x and prevented the scanner setup utility from finding the scanner on the network. I wired the scanner into a hub and then set up a hub to plug the router into so the computer next to it would get a 192.168.1.x IP address while the router can continue on 192.168.2.x.

Then I ran the scanner setup utility and it added the scanner no problem, but when I opened the MP Navigator scanner application included by Canon, scanning always failed and returned error code 5,145,61. I reinstalled, changed the active scanner in the network scanner utility, all to no avail. I went back to the printer and printed out it’s LAN Configuration information and sat back at the computer.

Finally, I opened the MP Navigator application again and entered the scan photos dialogue, then clicked on the preferences button at the top right of the window. In the product name dropdown you’ll see MX870 series (Network:xxxxxxxxxxxx) where the Xx represents the MAC address of the connection type (LAN will have one MAC address, and wireless will have another). In this case, it turns out that even though I had selected the correct address in the scanner setup utility, the application preferences were still trying to use the wireless MAC address of the scanner. Since it was connected to the wired network, this obviously caused it to fail.

The solution is to click into the dropdown and find the mac address that matches the LAN settings printed out (it should be the only other available option.

This was done in CentOS 6.4 but PolicyKit is part of gnome so it should work across different distriubtions.

I’ve run into this problem before, but it finally today became something I needed to solve after I moved the server to a new office with no monitor or inputs.

I would VNC in but the external drives could not be mounted due to gnome policykit controls (for security’s sake).

So, here’s how to enable disk mounting in a VNC session in policykit.

CD into /etc/polkit-1/localauthority and you’ll find a bunch of files:

net.reactivated.fprint.device.policy org.fedoraproject.config.firewall.policy

The one we’ll want to edit is org.freedesktop.udisks.policy.

First, backup this file:

sudo cp /usr/share/polkit-1/actions/org.freedesktop.udisks.policy /usr/share/polkit-1/actions/org.freedesktop.udisks.policy.bak (or any other location you prefer).

In the terminal, run the following command: vi /usr/share/polkit-1/actions/org.freedesktop.udisks.policy

Look for this section:

<action id=”org.freedesktop.udisks.filesystem-mount”>
<description>Mount a device</description>
<description xml:lang=”da”>Montér en enhed</description>
<message>Authentication is required to mount the device</message>
<message xml:lang=”da”>Autorisering er påkrævet for at montere et fil system</message>

Change the fields in red so that all say “yes” instead of no.

Save the file (in vi, this is down by hitting the escape key, then typing a colon, W, Q!, and will look like this: :wq!). Restart the VNC session. You should now be able to mount your external drives in a VNC session.

Recently a hard drive failed in our RAID 5 QNAP NAS array. The CTO suggested a low level format would make the drive usable again, and he was right. In my case it was a Seagate drive, so I used Seatools and it’s full erase feature. I found that Seatools wouldn’t run via USB, nor would it run on a spare box I had laying around, so it was easiest to burn Seatools to a CD and just plug the drive into my desktop. This took about 14 hours total so I let it run overnight.

Once I plugged the drive back into the QNAP, I expected that the RAID array would begin rebuilding. This was not the case, however, and is apparently a shortcoming of the QNAP system. Their software RAID can’t recover from dead disks apparently, but only ones incorrectly flagged as faulty.

I did a lot of googling to figure out how to fix this, and with a lot of help from this site figured out step 1.

The first step is clone the partition structure of the drives over to the newly formatted drive. To do this, first ssh into the QNAP server as the administrator.

Run fdisk -l (that’s a lowercase L) to get a listing of all disks in the system. My QNAP server has 4 drives, each labeled with a number over the drive bay. These numbers correspond to sda, sdb, sdc, and sdd. In my case, sdc failed, and after replacing it was still recognized as sdc.

Find one that’s complete, as this is what you’ll want to copy over to the new drive. The new drive will be the missing label in the fdisk output (sdc was missing in my case).

Next command: fdisk /dev/drive label (for me: fdisk/dev/sdc)

Type n and tap enter for a new partition. For partition type, enter p for primary. Enter 1 for the partition number, and 66 for the last cylinder size. Stick with the default value for first cylinder, but enter different values for the last cylinder of each partition.
Type n and tap enter for a new partition. For partition type, enter p for primary. Enter 2 for the partition number, and 132 for the last cylinder size.
Type n and tap enter for a new partition. For partition type, enter p for primary. Enter 3 for the partition number, and 243138 for the last cylinder size.
Type n and tap enter for a new partition. For partition type, enter p for primary. Enter 4 for the partition number, and 243200 for the last cylinder size.

Next mark the first partition of your drive as bootable:

Command (m for help): a Partition number (1-4): 1
Then change partition 2 to ‘Linux Swap / Solaris’ format Command (m for help): t Partition number (1-4): 2 Hex code (type L to list codes): 82 Changed system type of partition 2 to 82 (Linux swap / Solaris)

Finally, save the new partition table Command (m for help): w The partition table has been altered!

Ctrl-C to exit fdisk

Eject the new disk and reinsert

The site I linked to then says that all you have to do after this is eject the disk and reinsert it, and the rebuilding will begin. However this is not what happened for me.

The disk structure was cloned just fine, but the array was still running in degraded mode even after I restarted the NAS.

I had to begin the rebuild process manually, and actually ended up calling QNAP to find out exactly how to do this. They wanted to remote into my machine using teamviewer, but I declined and ask them to walk me through the commands (since I’m comfortable with the terminal, this was fine, but YMMV).

This command must also be run while SSH’ed into the QNAP server: mdadm -a /dev/md0 /dev/sdc3

sdc3 is the largest partition in the QNAP layout and the one that is part of the array, while the other smaller ones are for the OS this one contains the data stored in the array.

The rebuild process could take a few hours (I allowed mine to run overnight). To follow the progress of the rebuild, use this command: cat /proc/mdstat (note: this will not work directly from the command prompt upon SSHing into the QNAP. I had to run “cd ..” to go back to the root directory before it would work.

Once the rebuild is complete, reboot the NAS. Once it’s online again and you can log into the web GUI, you’ll see in the RAID management page that the status has gone from “degraded mode” to “ready” and you will see all 4 drives listed instead of just the 3 healthy ones.

My year in review

December 23rd, 2012

I’ve been quite busy since my last blog post.  I’m currently writing this home from home, where I’ll be until some time next week for the Christmas holiday, but I figured now was a good time to fill in my readers on what I’ve been up to.

I was unemployed for 3 months, from March to May. This was a tough time for me, surviving off of severance and unemployment benefits, but I made out just fine. I went to the gym every day, and applied for jobs all week long. An ex came to visit when I started my new job, which didn’t really go so well mostly on my part due to the stress of having to find a place to live in 2 months, saving the $1000+ deposit and first/last month rent needed to move in, and paying the bills.  Not much happened during this 3 month chunk, which has made my year feel very compressed.  March was a great month to be unemployed in Boston though, 2 weeks of 70-80 degree weather, enjoying it on my friend’s deck.
I got creative towards the end of my unemployment and decided to crash some job fairs at local universities. Luckily Boston has a little over a dozen of these. I went to a career fair at Boston University, just slipping in past the sign-up table wearing my suit and began talking to recruiters. Ran into one former recruiter from my old company so we chatted for a bit and exchanged info, and then I moved on and found another recruiter who told me his cousin was looking for an IT person.  I gave him my resume, got his card, and emailed him a copy of my resume a day later.  Soon, I had an interview with a small biomed firm in downtown Boston.  That interview was the Thursday before mother’s day, I had 2 interviews in all and then started on June 18th.
I’m proud to say I’ve been employed full time since September (I started on a 3 month contract in June) and started with an excellent raise as a network administrator. My familiarity with linux was a great advantage to getting this role, as we use CentOS all the time, but my willingness to play around with new software and find better/faster ways to complete a task played a role as well.  I do a large chunk of software testing and IT support, and it’s safe to say that I’ve roled all of my skills into this one position. I even work with a German, and get to speak German with her every day. I will be starting a second job in January doing IT support at a local German school’s evening programs, where her father works. This will give me the chance to attend cultural functions I normally wouldn’t attend on my own, and expand my skillset while meeting authors, filmmakers, and other guests of the Institute.
As to finding a place to live, I moved from East Somerville, MA to Revere, MA. East Somerville was not very convenient and made me heavily reliant upon the bus system which got old very quickly if you had to go anywhere when it wasn’t rush hour.  Revere has a few downsides (Beachmont specifically is very sleepy) but I live just a 10 minute walk from the train station, which takes 20 minutes to get me to work. I live in a 2 story house on the top of the hill and I can see the ocean from my window. Many of my friends remark that I live far away, but in reality it’s only far when you factor in where they live. From the downtown area it’s often much closer than the other transit lines, plus I always get a seat because I live so close to the end. Bonus points for the house because it has a bar and a woodstove. I live with 2 other people, one of whom is the landlord, and he takes care of everything. Both guys have cars and I can occasionally borrow one if needed but with Target and the grocery store a mile away I generally try to walk there when able. The best part about this place is the rent is only $600/month rather than the $975 I paid for a studio, and while I sometimes do miss the privacy a studio affords, I’m really enjoying saving the extra money I used to be paying on rent. It feels great to have a safety net savings account for the first time in my life.
Other notable events of the year include meeting Kat and Mouse, if for just a few short hours. Kat came to town to check out hotel accomodations for a conference she was organizing, and Mouse came down from Maine so the 3 of us got dinner on the hotel and shot the shit for a while.  I put together a server for the first time ever which was a lot of fun, and learned a lot about RAID and VLM, and took this one step further to set up a RAID array with LVM in a remote server using only a text file and some googled walkthroughs tailored to my needs (post forthcoming). I’ve also been learning a lot about software testing and automating, using tools such as sikuli, selenium, and TestLink, and hope to do some writeups on those in the future. Oh, and I turned 27.
For now, I’m enjoying being home, spending time with the family and all the animals, and occasionally shoveling some snow. Off to bed with me now.