Industry


Ads by TechWords

See your link here


Networking Nightmare II: Adding Linux

Well, the nightmare part has kicked in.

Bear with me, folks, because I'm going into some detail so others may learn from my pain.

The other night I was up until past 3 a.m. trying to get the Linux machine to access shared folders on the Win 98 machine. At least I found out that many, many other Linux users faced the same problem. Even better news, thanks to somebody named Rafal and his "LANMAN fix," I got it to work. More on that later.

First some background.

Last time I documented the extent to which I could share files among my Windows (Win 98, Win XP and Vista) machines.

There was just one thing that didn't work, so I decided to add Mac and Linux machines into the mix before tackling it.

One big problem is that I'm a Linux newbie. I installed Ubuntu 8.10 (Intrepid Ibex) on my old work ThinkPad and have been learning Linux on the fly. It installed fine from a disk image I downloaded and burned onto a CD. I actually have dual-boot options with XP but Linux is the default.

Lousy documentation

At the risk (well, certainty) of being flamed, I must say that Linux documentation is abysmal. I tried local help files and Web documentation and both were almost useless.

I don't know if documentation isn't keeping up with the actual OS development or what. I know it's a free volunteer community effort and all, but there's an annoying disconnect between what the documentation describes and what the user actually sees, even in the most basic menu options.

And spelling and grammar errors are minor in effect but distracting and indicative of the general sloppiness. And instructions seem to be too complex and all over the place with no continuity in form or substance, with different packages needed, different ways to get them, etc. But you can usually find what you need thanks to the vast user community.

I ran into this sloppiness immediately. My Linux PC connected to my wireless network just fine (I've had hellish problems when the correct drivers weren't available). I clicked on "Places>Network" to bring up a WINDOWS NETWORK icon.

Opening that showed the HOME workgroup, which displayed the three Windows machines: "Windows shares on home." The location box displayed "SMB:///," indicating connections would take place via the Server Message Block file sharing protocol.

Win 98 problems

I could connect to XP and Vista shares, but not Win 98. The shares icons displayed fine, but clicking them brought up a log-in dialog box, asking for username, domain and password. No combination worked, and I must have tried literally dozens. Everything resulted in an error:

"Unable to mount location"
"Failed to mount windows share"

So I tried to approach it from the back way, accessing shared folders on the Linux PC from the Windows machines.

The help file wasn’t much help at first. Opening it and searching for "sharing" brought up documentation for a "Shared Folder Administration Tool." It said to start it up by clicking on the top-level "System" menu, then "Administration," then "Shared Folders," but there was no such menu item.

But it did list two alternative methods: opening a Terminal box and typing the command "shares-admin" or right-clicking on a local folder and selecting the option "Share Folder." There was no such option, but "Sharing Options" was close enough. Just another minor annoyance.

I right-clicked, selected the "Share this folder" check box and it asked me for the name of the share, which I supplied. Then I clicked on the "Create Share" button, supplied a password and got an error message:

"Samba's testparm returned error 1: Load smb config files from /etc/samba/smb.conf
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
ERROR: lock directory /var/run/samba does not exist
ERROR: pid directory /var/run/samba does not exist"

Up popped a box with the notice "Sharing service is not installed. You need to install Windows networks sharing service in order to share your folders."

I clicked on "Install Service" and this time it installed the Samba file-sharing service.

I wanted to make sure exactly how it worked so I installed the same Ubuntu package on a desktop drive and tried it again (after spending a couple hours tracking down and installing the right wireless driver.)

Same process, different result (?)

Strangely, the process was different.

This time, after clicking on "Create Share," it immediately downloaded Samba after I supplied the password. There was no initial error message.

But when it was done installing I clicked on the "Details" switch and that brought up a terminal window showing all the activity that had taken place. It said it was replacing the "smbclient" with a later version, and toward the end there were a bunch of error messages.

Perhaps this install included the "smbclient" somehow while the other didn't, because of an inadvertent update or something. I did use different install disks, but they were burned from the same file on the Ubuntu site.

Anyway, after rebooting, I could access the Linux shares from the Windows machines (and even the Mac, but that's a story for a different day). The Linux laptop showed up in a workgroup named "WORKGROUP" and the Windows PCs were in the "HOME" workgroup, but that didn't impede anything.

But I had the same problem as before: the Win 98 shares just wouldn't work. I couldn't get past the log-in box.

I searched the Web and found a lot of people had experienced the same exact problem, but no one had any answers. Many people said the problem hadn't existed in earlier versions such as 7.10, or prior to "Hardy."

Upon upgrading, they couldn't access authenticated shares in Win 98 and some other Windows versions. If the password protection was removed, the shares could be accessed -- which I verified. Some people were quite annoyed and didn't want to do that and actually reverted to earlier Ubuntu versions.

Finally I found the answer on a bug report site. It was titled "SMB error: Unable to mount location when server configured with security=share" and had some 160 posts about similar problems, ranging from March 31, 2008, to Feb. 23, 2009 -- just over a week ago. There were dozens of proposed solutions but none of them worked.

Rafal to the rescue!

But near the end, I found this post:

"Hi folks - I was trying to fix this for hours, and have a (albeit idiotically simple) fix that worked for me:

on the client, /etc/samba/smb.conf file

[global]

# THE LANMAN FIX
  client lanman auth = yes
  client ntlmv2 auth = no

  Notice the word CLIENT in front of both of those... try to re-mount the smb share again and it all works nicely.

Cheers.

/Rafal"

Bless your heart, Rafal, wherever you are. I don't know what those settings mean, but I plugged them into the smb.conf file and it worked like a charm. All the Windows machines can now access Linux shares and vice-versa.

Hopefully those settings didn't just deactivate all password protection on the Win 98 machine or do something else risky. I'm going to investigate that when I get a chance, to learn a little more about Linux.

But right now it's on to the next nightmare: the Mac.

What People Are Saying

smb.conf in samba

Do you know anything about this? Can I resolve this problem with build my own samba from sources?

Ubuntu Guide and Kubuntu Guide

Linux is not Linux is not Linux.

I have not had the problems you had.

Maybe it's because I use new versions of Ubuntu and Kubuntu, where networking has become seamless and painless.

What kind of dinosaur are you to be using Windows 98? Damn, that's dangerous -- there are still lots of worms in the wild that target Windows 98. You are crazy.

Geez, Computerworld must be desperate for writers... I hope you didn't have to drop out of nightschool for two semesters while you figured out networking...

Ubuntu and Kubuntu have pretty good documentation, actually.

Here are two good examples:

Ubuntu Guide at ubuntuguide.org

and

Kubuntu Guide at kubuntuguide.org

This was a HUGE help

Others may have found this less useful, but it was a HUGE help for me. I run an elementary school computer lab which I'm in the process of converting over to use Ubuntu. I've got lots of shared folders on an old Win98SE peer to peer server- many will scoff, but it doesn't have the licensing costs of an 'official' Windows server, the restrictions to 10 simultaneous users of connecting to a Win2000 Workstation or XP Pro system, has had near 100% uptime and reliability, and is easy for students and teachers to access- from our Windows (2000 and XP) workstations.

The default Ubuntu installation allowed students to connect to shared folders lacking passwords, but we had the same issue you reported connecting to student and teacher folders requiring passwords. I had been unable to find a solution. My long-term plan has been to move to a Linux server- but that's for later.

The two line edit to the smb.conf file lets users easily connect to their password-protected shares- letting them access saved files now, rather than when I get an alternative in place.

A big help. Thanks!

Under Windows98 there is no

Under Windows98 there is no NTLMV2.
So thats the Problem, while the authentification doesnt work correct.

But there is a way to enable it. So you got all clients with nearly the same network configs.

Guide for activating ntlmv2 on win98
http://support.microsoft.com/kb/239869/en-us/

I think if you setup this. you can share correct between all you os´es

Windows 98 ?

Care factor = 0%.

Ubuntu Documentation

I am not a Linux newbie (have been running a Fedora server for many years), but after installing Ubuntu 8 on a laptop I could not get wireless to work or show signals.
The help available was plainly wrong - after a while I realized it referred to ver 6 or 7, but it lead to a wild goose chase changing various recommended network settings and entering keys but to no avail.

The answer was simply to left click on the wireless icon instead of right clicking. It then showed the networks and asked for the key on being selected!

I understand that someone has to maintain the help files but it should at least indicate which version it applies to.
This problem was basic help and it was changed behavior from previous versions - this basic help stuff should at least be correct for each new release.

Linux Documentation and Community

As far as documentation goes, note that the whole of the Linux community is not in the US or even the English speaking western world. For many Linux developers, English may be a second language or less. There are few paid professional technical writers (as in do documentation for a living) working on Linux projects. You do not think that "highly useful" Microsoft documentation came from the developers do you? Technical writing is both an art and science completely separate of developing and coding.

Even among good English speaking Linux developers that get paid to work on Linux, there is little or no time allotted for writing user documentation (if any documentation). That is part of why the community is there. And as previously mentioned, lots of "HowTos" from other users like yourself who have "been there, done that".

The reason there are so many *distributions* of Linux is that there are so many groups with a different idea of what is most important, especially among conflicting options. By enabling those features (LanMan AUTH and NTLM) you have indeed reduced the security of your passwords required to access they Windows 98 system. The Ubuntu community in recent releases put security before that specific ancient feature support. Let's face it, Win98 is hardly found the wilds of the modern world. But lucky for you, support for it DOES exist. You just had to choose to enable it (and therefore choose to reduce your overall security).

In Windows XP and Vista, the default is to support Win98 file shares by automatically reducing security without telling the user unless the user's administrator explicitly disabled NTLM and LanMan in the system/group policy. Check the Microsoft documentation of those settings. Most medium and large corporations actually disable LanMan and NTLM support as part of their security policy (enfoce NTLMv2). Of course they do not use Win98 either.

As far as the minor annoyances in setting up your Ubuntu install did you attempt to see if Ubuntu has a bug report for each issue, and if not, create one? Ubuntu makes their bug tracking system open to the public at large. It covers everything from nasty system failures to simple documentation and user interface issues. If the developers do not know there is a problem how would you expect them to resolve it? Again, that is p[art of being in the community.

I say this to encourage you to not use the community and complain when it fails you, but to become part of the community and help improve it. How would you document this feature or issue? Where would you place that in the overall documentation of the Ubuntu distribution? Is this something that goes the quick setup guide (user) or the advanced system admin manual?

This article could be a good first step toward becoming part of the greater Linux community, but I recommend that you understand the issues you are complaining about and make a future "to help other users" article focus on getting the task done and less on complaints. Save the complaints (rants) for opinion pieces. Agree or not everyone has already read the 20 other articles on any given Linux distribution's or application's or project's documentation. =)

Things to ponder. Good luck and happy computing.

Hang in there!

First, let me set the stage by saying that I've been using Linux since the days of Redhat 4.2. Today, my 40 million dollar company relies upon Linux for almost everything mission-critical. So, I know a bit about it.

I applaud the OP for jumping in to try it out. You're grabbing the bull by the horns and taking on a serious project. I've had my struggles, too, and agree with you on a few points:

- documentation (and here I include list posts, blog entires, etc.) can be rough and sketchy. And, it can sometimes be contradictory. But, I've seen the same type on the Windows side of things. But, it can be great, too.

- people are willing to help when one reaches out. Everyone who offered suggestions (and encouragement) here bears that out. Certainly, one must be patient, as we are mainly volunteers who are also busy with other tasks.

- your project actually adds to the corpus of work around Linux. It fosters healthy discussion. We can build on that.

- remember that, while Linux began its life in 1992, it's only really gained traction in the last 5 or 6 years. At the desktop level, even less time. But, as the body of practitioners continues to grow, we'll see more and more refinement. We'll get there.

- Linux users need to accept criticism of the OS and FOSS, especially that of the constructive sort, more graciously. We need to use it as a basis for growth and improvement. Using it for anything else is a waste of time and energy.

So again, good on the OP for trying, and for sharing his journey with us.

What the hack/fix does:

This is to disable the ntlmv2 (NT LanMan version 2) authentication protocol and force the old version 1 protocol (if my Linux network-speak is sufficiently proficient).

It is less secure (as you would expect from Windows 98 code). But it is not all that bad. I am still running an old Buffalo Terastation that is limited to version 1, and I'm not losing any sleep (yet).

But I think you will have an issue if you put a Vista Home system on the network - it does not support the version 1 protocol without a low level registry hack or an equally inconvenient custom application or a possibly illegal copy of the local policy tool from a Vista Business system.

linux

This is exactly the problem with linux (all 10000 varieties). How can the linux community expect people to leave windows for linux when something as simple as file sharing is such a pain in the a-- to set up? And now you want someone to patch the code AND document it? And why do I want to do this?? Just to stick it to MS. Dream on........