Advertisements

Samba Setup Woes

As with all Windows boxes, the old Lenovo Q150 (dual booted with Win 7 Home Premium) became slow and cranky, despite not being used for anything other than monthly science and annual taxes. Various fixes and tweaks being unavailing, I swapped in an Optiplex 780 (dual booted with Win 7 Pro), replaced the IBM L191p monitor with the recapped Dell 2005FPW, reinstalled all the programs, and discovered that Samba was intermittent.

For future reference…

Win 7 Pro includes the Remote Desktop Protocol server that’s missing from Win 7 Home Premium. Oddly, RDP works better than UltraVNC, using Remmina as a client.

The file server in the basement runs Xubuntu 14.04 with Samba 4.1.6 and works perfectly with smbclient, showing no glitches at all. Even when the Win 7 box doesn’t show the server shares at all, it’s rock solid to my desktop Xubuntu box.

The familiar sudo service samba restart doesn’t actually do that any more, so get used to the two-step dance:

sudo service nmbd restart
sudo service smbd restart

However, that sometimes seems to start a spurious third copy of smbd (there should be two, for unknown reasons), so it’s better to use a four-step dance:

sudo service nmbd stop
sudo service nmbd start
sudo service smbd stop
sudo service smbd start

The old SysV init system wasn’t good enough, so they invented the run-all-the-things upstart, then systemd Borged upstart, all while Samba, one of the most critical Windows interfaces, still hasn’t emerged from the original init scripts. They call this progress, but I’m not sure.

Telling the Samba server to not be the domain controller, which should resolve intermittent pissing matches over who’s on first, had no effect.

When the Win 7 box does show the shared files, everything works fine: files read & write with the proper permissions, the owners & groups are fine, all is right with the world. In between those moments, however, nothing works, because the share simply doesn’t appear.

Then, seconds or minutes or tens of minutes later, it’s back!

Setting map to guest = bad password, as found in the usual random blog comment, had no effect.

The most recent Samba update replaced the /etc/samba/smb.conf file, so we’ll restart from scratch and see what happens next.

My general approach to Samba has been to futz around until it mysteriously starts working. That seems not to be of any avail this time around; we may put the tax data on a USB stick and move on.

Advertisements

  1. #1 by Andrew on 2015-03-02 - 09:45

    And all this demonstrates so clearly why I’ve sworn off messing around again ever (ever!) with that Linux nonsense. Wasted so much time in the past trying to get stuff going on boxes that ran win xp straight off the bat and forever, no problems. I know – windoze is evil and virus prone and…’cept it aint. If stuff’s done right and you don’t mess with it. Like letting MS do ‘essential updates’.

    So, go on. Grab a new laptop and load win 10 trial version. Surf the wild edge. You know you want to…

    • #2 by Ed on 2015-03-02 - 12:36

      Well, remember that I got into this after a perfectly serviceable Win 7 Home Premium box suffered the inevitable Windows Slowdown, so I popped a Win 7 Pro box off the stack to replace it. And, as nearly as I can tell, the network browsing hole isn’t in Samba’s end of the boat.

      After the usual initial setup annoyances, Xubuntu boxes Just Run forever; the original file server trundled along with Xubuntu 12.04 until I decided the hard drive was about ready to fall over dead.

      Grab a new laptop

      A guy who shows up at SqWr occasionally has been having lots of fun stuffing Win 10 Tech Preview onto a laptop…

      • #3 by Red County Pete on 2015-03-02 - 16:37

        inevitable Windows Slowdown

        Haven’t run into that on my Dell. I let MS do the updates as necessary, I don’t do video or other resource-intensive stuff. I do have to clear the cache occasionally in Pale Moon, but that’s been going on for years (back to Firefox). OTOH, I have plenty of disc space.

        Now that I have more bandwidth, I’m going to look into the “most modern” distribution I can get away with on my 2001 vintage Sony. Still browsing the off-lease laptops at Dell, but we’ve had other priorities. FWIW, I suspect they mucked with networking in Win 7. My old Samba did fine with Win 98, Win XP and ME, but it wasn’t so easy at Win 7. I did OK with the Slackware 12 box and Win 7, but it was a limited trial, and the boxes are now in separate locations. I’m not going to do a 600 foot range wireless LAN…

        • #4 by Ed on 2015-03-02 - 18:40

          it wasn’t so easy at Win 7

          Yup, must be Samba’s fault… [sigh]

          Mapping a network drive at login worked fine, even when network browsing showed no evidence of the Samba server, soooo we’re using the file on Drive Z: and ignoring the intermittent browser thing.

  2. #5 by eriklscott on 2015-03-03 - 12:45

    I suppose one way would be to skip samba (and CIFS) altogether, and use webDAV for file services. On ubuntu, you would configure Apache httpd to enable WebDAV, and then mount that on Windows, Linux, Mac, FreeBSD, OS/2, webOS, and Android. Solaris, if you’re feeling retro. Each of these can also be a server, in case you, I don’t know, want you use your cellphone as a file server or something. Just sayin’.

    Yeah, webDAV wasn’t originally intended for this sort of abuse, but it has quickly turned into a general purpose, user space network filesystem. OK, I’m not positive webOS can be a server, but there was Apache httpd support for OS/2 at least at one point.

    Let’s see – Blackberry (old world) app for a buck – client only. Some versions of Symbian have client-side support (I have one in a box somewhere – dunno if it has webDAV). Some Siemens PLCs have a webDAV client with security problems, in case you want to wreck a centrifuge or something. Looks like it runs on anything short of a Converse High Top ( https://books.google.com/books?id=RMd3GpIFxcUC&lpg=PA28&ots=28S3JFENEh&dq=%22with%20which%20you%20tread%20it%22&pg=PA28#v=onepage&q=%22with%20which%20you%20tread%20it%22&f=false ).

    • #6 by Ed on 2015-03-03 - 13:10

      Man, that’s like driving past a nasty collision: you can’t help but look, even though you don’t want to see…

      Will setting up Octoprint for the M2 redeem me, just a little bit? [grin]

      • #7 by eriklscott on 2015-03-04 - 00:20

        I have a soft spot in my heart for pure, joyous hackery. [similar grin]

  1. RPi: Time-lapse Photos | The Smell of Molten Projects in the Morning