Thursday, January 11, 2007

Samba Fun!

I'd been wondering why a couple of things on our new Linux image weren't working quite right.

When students went to log into their lockers (hosted on a Samba share), it prompted them for their Username, Domain, and Password and the Domain was filled in as "WORKGROUP". I figured this was rather strange, since it showed up as "MCCSC" on the old image, what it should be.

"Oh well," I concluded, "I've got too many things coming at me to worry about this little thing, the students can type 5 extra characters when they want to get to their lockers, it's no big deal..."

I'm starting to wonder now whether it's not just the symptom of a much more basic problem.

The thing that got me to re-evaluate my conclusion was the fact that on the new image, WINS resolution just isn't working. After conversing with my friend, Google, and consulting my other friend, Book, I stared at the configuration file that I had DEFINITELY set correctly. I compared it to the configuration file from the old image, the one that works right, and everything was the same, but the new image just wasn't behaving properly.

Although feeling vindicated in that I did not cause the problem, I'm perplexed because that means I can't undo any stupid mistakes and have it fixed. Not to mention, since it's not working right I'm still got a bad feeling that it's my fault.

I ran the "testparm" command which is a very basic diagnostic that just tells you whether /etc/samba/smb.conf is correctly formatted, and *gasp* there's an error...but not in the smb.conf file! I ran "testparm" on the old image and no errors.

These are the three errors I get running "testparm" on the new image:

ERROR: lock directory /var/run/samba does not exist
ERROR: pid directory /var/run/samba does not exist
WARNING: passdb expand explicit = yes is deprecated

The strange thing is that these errors pop up AFTER it already says that it "Loaded services file OK.", so where the hell is it getting "passdb expand explicit = yes" from?!

Still not quite convinced that I didn't break something somehow, I booted to the Ubuntu Live CD, absolutely fresh image, ran testparm and BANG! Same three error messages!

It's NOT my fault! Hooray, I have proof!

Now...what gives? and how do I fix it?

Google is not being helpful at all with these error messages, which is rare.

I wasn't able to flag a live person on #samba on irc.freenode.net. I said the following there:

I am running Ubuntu Edgy Eft (testparm -v = 3.0.22), and I noticed that none of the parameters I was specifying in my smb.conf file seemed to actually be DOING anything. I looked long and hard and consulted online documentation, Google, even a book (Linux in a Windows World), compared my smb.conf to one I had on an earlier installation (Ubuntu Breezy Badger, testparm -v = 3.0.14a-Ubuntu) that was working fine, and came to the conclusion that I had everything correct.

After painstakingly assuring myself that my smb.conf file was correctly formed as I wanted it, I tried "testparm" and noticed that I got three strange error messages AFTER being informed that it "Loaded services file OK.", these were "ERROR: lock directory /var/run/samba does not exist", "ERROR: pid directory /var/run/samba does not exist" and "WARNING: passdb expand explicit = yes is deprecated"



None of these errors are present when I run testparm on Breezy. Anyhow, just to make sure I hadn't made any stupid mistakes along the way I booted to the Ubuntu Live CD, ran testparm, and got the exact same error messages.

What gives? More importantly, how do I fix it?

Any help would be greatly appreciated!

powered by performancing firefox

5 Comments:

Blogger Tom Hoffman said...

You'd probably be better off asking Ubuntu experts about this, because it sounds like they might have rearranged the Samba config files, which is a distribution issue, not a Samba issue. I'm extrapolating here from my own experiences with Apache on Ubuntu. I've also read that it drives the Apache geeks crazy when Ubuntu users come to them with questions about where Ubuntu has put the config files. They don't know.

11:08:00 AM  
Blogger Simón A. Ruiz said...

Is there more than just smb.conf? The manpage for testparm only mentions smb.conf, and that's right where it should be.

12:59:00 PM  
Blogger SilverMoonBeam said...

Hey- BTW, remembering to type the MCCSC in is the bane of our existence here at North. Give us a break, but I do love having the Ubuntu- this way my home computers are compatable with hte school ones if I ever need to get around things. (I do wish we got to play with sources more... We can't do anything fun to mess with the setting even.)

9:45:00 PM  
Blogger Simón A. Ruiz said...

Yeah, I know it sucks, and I wish I'd've found a solution.

Though, if your biggst complaint is that, I'd say I did my job okay. :-)

That bug WAS fixed in Feisty, FWIW, but unfortunately for you guys Feisty only came out on my last day of work at North or so.

Incidentally, if you're complaining about having to type in MCCSC, then you're still using the last image I made for North, so there really are no limits to what you can do with the user settings, just they'll be reset to the defaults the next time that workstation gets rebooted.

You can thank your peers that would right-click on the taskbar, and "Delete this Panel", then minimize their Writer window and freak out that they lost their paper. Or the ones that would right-click the "Locker" icon and delete it and then complain that they couldn't get to their lockers.

Fixing those types of problems every period wasn't my idea of fun ;-) so I set it to automatically bring everything back to the defaults on boot, and told the teachers if any of the students messed something up to reboot the computer before calling me.

If I knew then what I know now I'd have been much more likely to have succeeded in getting you guys able to log in to separate accounts (the same login you use in the Windows computers, no more "student"/"student"), and would likely have not had to resort to that...

Anyways, I'm happy to hear you dig on the Ubuntu! How did you come to use it at home?

10:23:00 PM  
Anonymous oes tsetnoc said...

Hi, Just like to tell you that this piece of info is one quick to the point, no nonsense, workable and effective way to have directories shared in Linux as fast as possible. It worked for me and thank you for the effort. Keep up the good work.

2:59:00 AM  

Post a Comment

Links to this post:

Create a Link

<< Home