New Year’s Eve

Last post of 2011, I’m off to dinner.  Have a good New Year’s Eve, everyone.  Stay safe, and have fun!

Posted in Life | Tagged , | Leave a comment

Merry Christmas!

Just thought I’d take this moment to wish everyone a Merry Christmas!  I hope you had an enjoyable weekend, spent some quality time with loved ones, got/gave some thoughtful gifts, and ate some good food.

2011 Christmas Tree

This was a good tree. In the future we will try for the slimmer ones.

Posted in Life, Nature | Tagged , , | Leave a comment

G530 Flicker Saga: The End?

Well, I hope everyone has had a great Solstice, and will continue having a wonderful holiday season with Christmas in a couple days.  Up here in NY it’s been pretty rainy and a little on the warm side, with little snow.  Hopefully we’ll have some for the 25th, as that would be fairly appropriate.  And hopefully when the inevitable lake effect comes we’ll all be safe.  If you’re reading this from somewhere out in the western US where they seem to be getting our winter weather, I wish you the best.

Anyway, as you may have seen me post here in the past, I’ve had some interesting issues with my Lenovo G530 laptop.  First, the screen became wobbly and shaky.  Then, it started to flicker.  The first of these was easy to fix, the second very annoying, and almost as easy to fix.  Well, I write now because the dreaded LCD flickering has returned.  Now, it’s been a while since I posted about it last, but in truth the fix lasted for maybe three weeks.  Figuring the cable had come loose, I repeated it, giving me another couple weeks.  Finally, a couple weeks ago I reseated the video cable only to have reliable operation for maybe a few hours before the flashing came back.  It seemed that the work around involved slapping the display repeatedly in certain locations along the sides, which served to jostle the wiring back into place, as well as relieve some of my frustration.  Then last week, after doing this for a while, I got fed up with this.  Here was the result:

Now, you might think that that was a little bit harsh.  But, I disassembled part of the screen and put it back together again.  I figured that somewhere in there something was in a bad position, and just needed to be tweaked a little.  And, it worked!  Since doing this I’ve had no flickering.  You might be wondering what, specifically was the problem.  Well, I still am too – all I did was take it apart and put it back together again, and it seems fine.

Now, given the popularity of previous posts a nice guide is in order.  However, there are a few things to keep in mind before going through this and attempting it yourself:

  • After taking pictures, I realized that I probably could have gotten some better ones for illustrative purposes.  So, I recommend that you take a look at Lenovo’s page with take-apart instructions for this unit.  Also, look over the entire graphic carefully before attempting anything, just to get a general idea.
  • You need to first follow the instructions for getting at the screen hinges, as well as reseating the video cables.  The first of these is more important.  Use it to get at the hinges; don’t tighten them as we’ll be unscrewing them.  The second is less necessary, but I recommend it to have easier access to the cables, and because you may as well reseat those while you’re tearing this thing apart.
  • There are a tone of small screws and such in this.  You probably already know this if you’ve taken it apart before, but it bears restating.  Find a clear, hard surface like a kitchen table to work on this, and keep track of your screws.  It should go without saying that an appropriate screwdriver set is a must (though you’re probably good if you’ve done this before).
  • Be careful when removing the screen bevel (after unscrewing the screws under the little rubber feet).  Use a small, flathead screwdriver and beware of power and data cables, as well as the camera up top.
  • This isn’t a bad time to clean the laptop screen while you’re at it.  I used a paper towel I dampened, and added a drop of dish detergent to it.  Try not to get and soap or water into the sides of the display.  Take another damp paper towel to rinse it.
  • Finally, this procedure is a bit more involved than ones before.  So, BE CAREFUL.  If you aren’t comfortable doing this, seek assistance.  And of course, do this at your own risk; I am not responsible for any damage to your laptop, yourself, or any other possession.

So, here it is:

Good luck.  This may help you, or it may not, but if the flickering has really been getting to you it’s worth a shot.  Overall, if you’re thinking of buying a G530, I’d recommend against it.  It’s pretty nice for a crappy machine, but it is a crappy machine.  But if you’re stuck with one, at least it’s not impossible to take apart.

Posted in Electronics, Hacks, Fixes, and Solutions, Technology/Internet | Tagged , , , , | 1 Comment

Thanksgiving

Things have been a little strange for me for the past couple weeks, and honestly posting here has not been at the top of my mind.  For one thing, I lost one of my cats, Lilly, who has been with me for about seventeen years.  That was a difficult week for me.  For another, I just haven’t had much to say.  I have been working on some things, though, and soon would like to share them.  I plan to make a wiki, which only I will be able to edit, but which will be a better format for posting projects and the like.  One thing I am working on is a true sine wave inverter, a simple one at first.  If you’re not sure what this is, check back eventually :) .

In the meantime, though, I had a great dinner last night with my family.  I am in the USA, but I wish you all the best on our Thanksgiving holiday, no matter where you are.  Life can suck sometimes, other times it can be amazing.  Many of us have a lot to be thankful for, so take the time to reflect while you’ve got it.

Posted in Life | Tagged , , , | Leave a comment

RIP Dennis Ritchie (and Steve Jobs)

This was originally going to be a post about Steve Jobs.  I had a draft going, but then I put it off.  And then just now I heard that Dennis Ritchie, one of the creators of UNIX, died today at age 70.

My original draft was going to be something along the lines of how Steve Jobs was sort of overrated in that he was more a marketing genius as opposed to a great technological innovator, but at the same time was a very important figure who helped to make technology more accessible to the masses and inspire people.  Well, Dennis Ritchie was certainly more the innovator.  UNIX and C are the foundation of so much in computing, from microcontrollers all the way up to super computers, and they likely will be for a long time.

So, long story short, there are many ways to have an impact, and it doesn’t just have to involve appearing in front of large crowds in jeans and a turtleneck.

Posted in Life, Technology/Internet | Tagged , , , , | 1 Comment

Lenovo G530 Suspend Problem

It seems that my most popular posts here deal with fixing some common issues with the Lenovo G530 laptop, namely with the screen hinges, as well as the screen flickering.  Well, judging by the comments it seems that these have helped people (even though you will probably have to repeat the screen flickering one, as the cable can come lose repeatedly).  I am glad they are of use to people; the G530 isn’t the fanciest laptop, but if you can deal with some of these things it certainly gets the job done.

I am having a particular problem with this machine, though, that I have not been able to sort out.  It deals with suspending to RAM, or I should say, the inability to do so.  What is supposed to happen is that I activate suspend, and the machine almost completely shuts off save for a blinking, blue LED.  Opening the lid then resumes the machine almost instantly, bringing me back to where I was.  (Yes, I’m sure most of you know what suspending to RAM is, but I’m just trying to be complete.)  However, when I actually try to do this, the machine shuts off, instantly.  No flashing light, no shutdown sequence, it just turns off as if I removed power and/or battery.  Turning it on again makes it boot up as if I had opted to reboot.  After a while I got used to just turning the machine off when I didn’t need it, but this is kind of annoying, and I would like to fix it.

Now, first things first.  As you can probably tell from this site I am a GNU/Linux user, and do in fact run Ubuntu on this laptop.  In fact, overall it runs well.  I bring this up because of many suspend issues which have plagued many of the distros, however for about the first year of having this laptop suspend to RAM worked beautifully.  (Hibernate did and still does, but suspend is more convenient.)  But to verify this I tried installing Windows XP (along with the hardware-specific drivers supplied by Lenovo on their site), but encountered the same behavior.  Same with other distributions.

Next, I figured on a lark that maybe this would have something to do with the battery, which when I first noticed this behavior was on its last leg (ie, 20 minutes of power).  I replaced the battery, but this did not help anything.  I tired looking in the BIOS, but couldn’t find anything that suggested a problem.  I tried updating the BIOS, but this didn’t work either.  I even tried alternating the RAM sticks, as well as using only one at a time.  (It is suspend to RAM, so I figured there might be something there.)

So, how about it, anyone else seen this sort of thing before, shutting down cold instead of suspending?  Maybe not even with this particular laptop?  Any ideas, thoughts, something I may have overlooked?  I will try to make something of an effort to look into this again myself, probably starting with running memtest86 on the machine (something which I did not do, and may reveal something more about the memory).  But, I would appreciate any input.  And if I come to a solution, I will of course do my best to report it here, with a nice pictorial guide if applicable.

Posted in Electronics, Technology/Internet | Tagged , , , , , , , | Leave a comment

Cyrus-SASL and IMAP and SMTP-Auth

I lost a little sleep over this, so now that it’s resolved, I’ll throw it here.  I have a Debian mail server, on which I have Email for some local user accounts (system ones, in /etc/passwd), and some virtual users in LDAP.  In order to do this I use the Courier authdaemon, which checks both those sources and lets me authenticate my IMAP and POP3 servers to them.  This works fine.  Thing is, I want to do SMTP auth as well, with Postfix.  (Note: Configuring all these things has been documented many times, look it up.)

SMTP-Auth is generally done via Cyrus-SASL (via saslauthd), which itself can look to a lot of places to determine if the user can log in.  Since I want to allow logins for SMTP to be the same for IMAP/POP, I have saslauthd try to log into my IMAP server (the rimap option, on Debian in /etc/default/saslauthd).  This worked great, until I upgraded to Debian 6.0 (“Squeeze”).

After I ran the upgrade, I was surprised to find that Thunderbird was reporting that Postfix was refusing my SMTP password.  I checked /var/log/auth.log, and found stuff like this:

Aug 21 14:11:48 clamato saslauthd[7289]: auth_rimap: unexpected response to auth request: * OK [ALERT] Filesystem notification initialization error — contact your mail administrator (check for configuration errors with the FAM/Gamin library)

ug 21 14:11:48 clamato saslauthd[7289]: do_auth         : auth failure: [user=myuser] [service=smtp] [realm=] [mech=rimap] [reason=[ALERT] Unexpected response from remote authentication server]

Now, both of the above entries are relevant, but I spent most of my time focused on the second one.  (D’oh!)  I searched around for it quite a bit, and found a couple bug reports about it from various points in the past few years.  I even tried one or two patches, but these did not work.  I tried downgrading and backporting, but these did not help.

Turns out the actually cause of this all (ie, SMTP-Auth not happening) has to do with the first line in that file, the one about FAM/GAMIN and filesystem notification.  Courier’s IMAP program likes to have this.  Apparently, it will even go so far as to tell you this when you log into the IMAP server, as I found out while finally deciding to do this via telnet.  I logged in fine, but in the login banner was the same alert message in the log…

Basically, what’s happening then is that saslauthd is logging into the IMAP server, getting the successful login response along with the alert message, and is concluding that the login was not in fact successful.  I was able to fix this just by installing the gamin package; see this page for slightly more information.

In my opinion, there is in fact a bug here, aside from my own inability to notice the other log message.   Courier logged me in successfully, even with the alert.  Saslauthd should’ve picked up on that.  Here’s the code to check this:

if (!strncmp(rbuf, TAG ” OK”, sizeof(TAG ” OK”)-1)) {
if (flags & VERBOSE) {
syslog(LOG_DEBUG, “auth_rimap: [%s] %s”, login, rbuf);
}
return strdup(“OK remote authentication successful”);
}

This is part of the auth_rimap.c file, and causes the auth_rimap function to return if the banner was correct.  However, if the banner is not exactly what it was expecting, it skips this and gives the unexpected response message.  I may put together a patch to change this, but right now I think I will go for a swim.

(On another note, I need to get a good code display plugin for this blog, so I’m not using block quotes for that.)

Posted in Hacks, Fixes, and Solutions, Linux, Technology/Internet | Tagged , , , , , , , , , | 2 Comments

Ubuntu Directory

Right now I am on vacation, as my last post may indicate.  It is beautiful here, the beaches are nice, and the fresh air is a much welcomed diversion.  However, I still think about random projects and things, and hence I take a few minutes here and there to right them down or even make up a neat little blog post.

The subject of this post is something I have kicked around for a little while, but have recently resolved to try to take on.  Basically, the situation is this: if you haven’t figured it out, I am a GNU/Linux user (though I do use OpenBSD and occasionally FreeBSD for some things as well).  At home I have a few different machines that run Linux, including a small server, a desktop, and a laptop.  There are several others as well, but these are the ones I use mainly.  The thing is, I would love an easy way to manage users and permissions across them.  Basically, I’m thinking of something similar to a domain, like you might see in a Microsoft-based network.

Now, yes, of course you can join *nix machines to a Windows domain (or have one be a domain controller via Samba).  I don’t really have any Windows machines, though, nor do I want to buy/pirate a server version of Windows.  I could also use Kerberos and LDAP, and in fact I do use them.  They work well for me for the most part, but I said in the last paragraph that I wanted an easy way to admin the network.  If you follow one of the various online tutorials about getting the two going the process of setting this up isn’t actually that bad, but adding and removing users can be a bit of a pain.  I mean, it’s not really complicated, but you’d need to add the user to Kerberos, then to LDAP.  Then I guess you can use an LDAP browser to manage the rest.  But, it seemed to me like there should be some sort of GUI tool that would manage both, IE let you create a user and add them to some networked groups and whatnot.  I was thinking of the name while considering a networked version on Ubuntu’s user and groups tool, hence the name.  (In other words, it wouldn’t have to be Ubuntu-specific by any means.)

Now, yes, there are other projects that aim to accomplish this kind of thing, like FreeIPA.  And I won’t lie, that one looks pretty neat.  But it just seemed to me that just having a frontend to take care of some basic user/group stuff would help out a lot.  Especially if you already have a Kerberos/LDAP setup.  So, at some point in the future I am going to see what I can do with my idea, and maybe whip something up in Python and GTK.  I can’t make any guarantees right now, nor say when I will get to working on it, but we shall see.

As a final disclaimer, I am not what you would call an “IT professional”.  I program, and I’ve done quite a bit of work with *nix and networking, but this isn’t my normal gig.  I haven’t extensively used Active Directory, and so I’m not trying to clone it.  I just want an easier way to manage some users across my home networks (for a couple friends, the cats, etc.), but to have the option of still getting at the guts if I want.  Hell, maybe the best way to go about this is just a nice shell script anyway.

Posted in Life, Linux, Projects | Tagged , , , , , , , | Leave a comment

Cape Cod Pics

Here are some random water pics:

It is certainly nice to be here now.

Posted in Nature, Pictures | Tagged , , | Leave a comment

Windows Shares in /etc/fstab

A project I am doing at work involves having a Debian Linux machine mount a Windows share, and then letting a script go in and pull some data out of files for processing.  A lot of this is easily handled by Perl, but the first task is to mount the share.  And this had me stumped for a second.

The syntax for mounting a share in /etc/fstab looks kind of like this (on one line):

//servername/sharename    /mount/point   username=user,password=pass,default   0 0

Now, I had something like that set up, but when I would try to mount it by typing mount /mount/point, I would get an error like this:

[mntent]: line 21 in /etc/fstab is bad
mount: can’t find /mount/point/ in /etc/fstab or /etc/mtab

Now, I couldn’t figure out what was causing this at first.  I mean, it worked fine when I just used the mount command.  But, it turned out that the problem was a space in the Windows share name (something like /servername/share name).  I had thought that using a simple \ to escape the space would work, but on a hunch I searched to see if there was a proper way to escape, specifically for /etc/fstab.  This post explained it, and now I have the following in /etc/fstab:

//servername/share\040name    /mount/point   username=user,password=pass,default 0 0

Basically I just replaced the space with \040, which is unicode for a space.  Now I can mount it with no problems.

Posted in Hacks, Fixes, and Solutions, Linux | Tagged , , , , , , | 1 Comment