Matt's Linux Blog
My linux problems (and their respective solutions)
Sunday, May 27, 2007
LDAP Lessons
I've learned a couple things about OpenLDAP in the past day:
- An object cannot belong to more than one STRUCTURAL objectClass
- An object must have a STRUCTURAL objectClass
- Don't do anything regarding authentication using an alias.
- Weird things happen when you delete an attribute that objects use from the schema.
- Use the "mail" instead of "email" attribute.
- C# makes it quite easy to search an LDAP tree.
However, I'm currently having trouble getting a DN from a DirectoryEntry or a SearchResult. I can get the Path, which looks like "LDAP://server/DN", but I want just the last "DN" part. I could do a simple string substitution, but that seems like asking for trouble later. Help!
Labels: addressbook, ldap
Saturday, May 26, 2007
Making an LDAP Address Book
I have taken on the task of creating a new networked address book for my parents. No one told me to do it; I took the task because I saw a need, and it gives me a perfect excuse to sharpen my technological skills. I have chosen LDAP to store the data. Usually, I would have used MySQL and designed a database, but LDAP allows me to have a hierarchical tree of objects, each node storing some data.
How is an address book hierarchical? In paper form, there isn't much reason for it to be. However, in electronic form, it makes perfect sense (to me, at least). Mainly, it's because families have children. That way, there can be one node for the family (a mailing address for "Alice, Bob, and Charlie Smith"). Under that, there will be separate nodes for Alice, Bob, and Charlie, which hold no address information, but may hold personal information about each family member. This way, it is equally easy to address an envelope to a family member as it is to address one to the whole family.
The main application of this address book (as many families' address books) comes around December, when it's time to send Christmas cards. Thus, I will be including a field ("attribute" in LDAP speak) called "sendCard", which will tell the application I build whether or not to print a label when it comes that time of year.
I have finished designing the hierarchy of the directory. The root is "dc=home,dc=mmlx,dc=us", which corresponds to the domain name "home.mmlx.us". I will have a subtree "ou=People" holding people represented in the directory, "ou=Users" holding entries for people that can use the directory, and "ou=Groups" holding groups for access control purposes. I'll draw up a nice diagram when I have time.
I'm about half done with the schema, which tells the database what data can exist for particular types of objects. I have designed the "mullPerson" object class, which holds the data one would expect to hold for a person. I am then going to define a "mullFamily" object class, which will hold address data, but not personal data. I'll publish those schema somewhere before I conclude the project, but if you want to see them now, just email me.
So far, I have found these to be good resources:
Labels: addressbook, ldap
Wednesday, May 23, 2007
BestBuy revisited
I received my restore DVD today, via FedEx 2-day. I took it in this evening to BestBuy, and got a very intelligent technician, who knew exactly which computer I was talking about. The conversation went like this: "Hi, I have these Windows disk that you needed for my laptop." "Oh, yours is the laptop with Linux on it? I'll take the disk and get started on it right away." He even stopped to mention that I had set my keyboard layout to Dvorak and that he could use it. Sharp guy. As I was walking away, he warned me to keep Windows XP on it because Microsoft will be discontinuing the product line.
I should have that laptop back in a week and a half to two weeks. We'll see.
Labels: bestbuy
Tuesday, May 22, 2007
BestBuy, Gateway, and Linux
As you might have guessed, I had Ubuntu running on my old laptop. It is two years old now — bought it in May 2005, along with a two year service plan. In January, the USB ports died (motherboard issue, I guess), but since I was in school, I waited until last Saturday to bring it to BestBuy. I take it in, along with my PCMCIA USB card. I demonstrate quite obviously that a USB memory card worked in the PCMCIA card, but not the onboard ports. The tech simply asks me: "What version of Windows
is that!?" I smelled problems.
I explained to him that I was running Ubuntu, which is a version of Linux, and I no longer have my Windows disks. That wasn't good enough for him. He explained to me that it was my responsibility to keep track of software, etc. I get the manager over, a process which took about fifteen minutes. He affirmed the poor tech's analysis, suggesting I call Gateway to get the disks. My warranty expires Thursday, so I wasn't about to wait for Gateway to send me disks. I suggested that they take the laptop and run their test suite (which the manager admitted was Linux-based) on it; he assured me that as long as they got the laptop into the shop before the warranty was over, the repairs would be covered.
Thus began the rather straightforward (but time-consuming) process of checking the laptop into their computer system. As I am about to leave, I mentioned that my power cord was flaky; he opened another ticket and told me to call 1-888-BEST-BUY. I did not at all expect this to be covered under warranty. He then offered me a $100 data backup service, which I declined, suggesting "You people couldn't do the backup anyway." Nope. I was corrected: they do have technicians who can use Linux to save files. Why can't these same technicians repair my laptop? Because the repair centers are somewhere on the West Coast, and
those repair centers require the "original software." After this two-hour process of scaling the support tree, I can finally leave, without laptop or much hope of repair. But at least they'll ship me a free power supply.
I called Gateway immediately when I got home, and I ordered a set of recovery disks for $20. My manufacturer's warranty was only one year, so there was no way for them to justify reversing that charge in the computer — or so they claim. They shipped it FedEx 2-day; it should be here tomorrow.
About six hours later, I received a phone call: BestBuy had tested my laptop, and the onboard USB ports were indeed defective. Now they just need me to bring the Windows disks in. I am taking them in tomorrow (assuming they are delivered), so let's cross our fingers.
Labels: bestbuy
Dell Latitude D630
Sometime in the next month, I should be getting a Dell Latitude D630. It's going to cost me $1488.43 (including S&H) for the following:
- 14.1" WXGA+ (1440x900) LCD screen
- Core 2 Duo T7300 (2.0 GHz, 4MB L2 cache)
- 512MB DDR2-667 RAM
- 80GB harddrive
- Intel GMA X3100 graphics
- DVD writer
- 6-cell primary and 6-cell media bay batteries
- 3 year accidental damage coverage (CompleteCare)
And then I'm getting a 160GB harddrive and 2GB of RAM from Newegg, pushing the total to $1721.34. Not too bad, considering my other options were a Macbook and a Thinkpad, both of which had many fewer battery options available. It's going to be interesting using Ubuntu with this, since it uses a brand-new chipset (Santa Rosa, aka Mobile 965).
It's scheduled to ship on June 8.
Labels: d630, dell
Wednesday, May 9, 2007
Replacing Gentoo with Ubuntu
I've used a wide array of Linux distributions since I started. First, there was DragonLinux, then came it's father, Slackware. Then I used RedHat (and then Fedora) for a while, but I got fed up with Fedora Core 2, so I moved to Debian. Since July of 2005, I have been using Gentoo, but now I'm getting fed up with even that. I've spent a couple weeks trying out new distributions to see which ones I like now.
What I want is a user-friendly system that has graphical tools for both standard end-user functionality and server functionality. I need a system that can run a decent server because I do a ton of web-application experimentation.
My main problem is that I hate something about every distribution. With Fedora, I hate the complete lack of support of any common media types. I ended up having to build my own RPM of w32codecs (so that I could play Windows media files), since everyone that hosts RPMs is scared of copyright and patent infringement. With OpenSUSE (10.2), I absolutely hated the excruciatingly slow package manager, and the fact I never could figure out when to use YaST or ZenWorks.
With Gentoo, I hate the extremely long time it takes to compile software. Also, there are no options for having a common setup already-built for me. Every time I want some software to interact, I have to set up myself. I could make my system into a wonderful system, but there are so many programs that I don't know can even interact.
I first used Ubuntu a year ago, since it was a Debian variant. I immediately liked it because it combined ease of use and ease of administration. I choose to use it now, as it is much easier to set up user-friendly programs, yet it is no harder to install a server onto than Gentoo was (it's actually a lot easier). I now use Ubuntu for my day-to-day work, but I am keeping my Gentoo partition around for my data. I don't plan to move my data over until I get my new laptop.
Labels: distributions, gentoo, ubuntu
Welcome
Welcome to my new Linux-centered blog. I will be describing many of the problems I face while using just about any technology. I will also post reasons for which I make the choices I make (such as PHP vs. ASP.NET vs. JSP, etc.) I hope you enjoy it (and that I don't give up blogging right after I start).
Archives
May 2007
June 2007
August 2007
October 2007
April 2008
May 2008
January 2009
May 2011

Subscribe to Posts [Atom]