I/O error on access to SMB shares of OS/2 Warp 4 host mounted in Ubuntu 7.04

Bug #112839 reported by TEN
6
Affects Status Importance Assigned to Milestone
samba
Won't Fix
Medium
samba (Baltix)
Fix Released
Undecided
Unassigned
samba (Ubuntu)
Fix Released
Undecided
Chuck Short

Bug Description

Binary package hint: samba-common

# mkdir /mnt/gatekeeper;mount //gatekeeper/filepile /mnt/gatekeeper -o username=penguin
Password:
# dir /mnt/gatekeeper
dir: /mnt/gatekeeper: Input/output error

/var/log/samba/log.smbmount:
[2007/05/06 15:26:32, 0] client/smbmount.c:send_fs_socket(415)
  mount.smbfs: entering daemon mode for service \\gatekeeper\filepile, pid=3897

/var/log/messages (excerpt):
May 6 15:26:33 ubi kernel: [81377.473657] smb_setup_bcc: Packet too large 4257 > 4096
May 6 15:26:36 ubi kernel: [81380.470136] smb_get_length: Invalid NBT packet, code=2f
May 6 15:26:40 ubi kernel: [81384.753385] smb_setup_bcc: Packet too large 4257 > 4096
May 6 15:27:03 ubi kernel: [81407.421388] smb_add_request: request [d82c1e80, mid=0] timed out!
May 6 15:27:06 ubi kernel: [81410.416406] smb_add_request: request [d82c1d80, mid=1] timed out!
May 6 15:27:06 ubi kernel: [81410.416609] smb_add_request: request [d82c1c80, mid=2] timed out!
May 6 15:27:10 ubi kernel: [81414.701273] smb_add_request: request [d82c1080, mid=3] timed out!

Curiously there is the following "non-specific" error when using the fawn's smbclient against that host:

# smbclient -L gatekeeper
Password:

        Sharename Type Comment
        --------- ---- -------
cli_rpc_pipe_open: cli_nt_create failed on pipe \srvsvc to machine gatekeeper. Error was ERRSRV - ERRerror (Non-specific error code.)
        IPC$ IPC Remote IPC
        ADMIN$ Disk Remote Admin
        BROTHERH Printer Brother HL-1650 BR-Script3 Postscript Emulation
        FILEPILE Disk Gatekeeper F: Drive
        FXPRINT Printer PMfax Print Capture
        HP_DJ_93 Printer HP Deskjet 930C

        Server Comment
        --------- -------
        GATEKEEPER

        Workgroup Master
        --------- -------

smbclient and mount operations against this very same server have been working fine for years using smbclient 2.2.7a-SuSE, so this might be a glitch introduced by the Samba 3 suite.

Related branches

Revision history for this message
TEN (launchpad-20-ten) wrote :

The issue is independently confirmed for all of Samba 3 (failing to act as a client for shares exposed by an OS/2 machine) by
http://lists.samba.org/archive/samba-technical/2006-September/049222.html
http://<email address hidden>/msg01848.html
N.B. this is reported as broken for both SMB(FS) and CIFS.

Revision history for this message
Felix Miata (mrmazda) wrote :
Mathias Gug (mathiaz)
Changed in samba:
status: New → Unknown
Changed in samba:
status: Unknown → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

The debugging information is in the upstream bug which I will monitor.

Regards
chuck

Changed in samba:
status: New → Confirmed
assignee: nobody → zulcss
Revision history for this message
Kai Blin (kai.blin) wrote :

This seems to be an error with mount.smbfs. smbfs is deprecated and will be dropped from the kernel at some point in the future. Try using mount.cifs. If that doesn't work, please report bugs for that, as that'll be the only kernel module left for smb mounting soon.

Revision history for this message
Kai Blin (kai.blin) wrote :

As TEN pointed out in IRC, it seems like you need to add a servernetbiosname=SMBSERV option, assuming that your server is called "smbserv". This is the NETBIOS name, so it needs to be in all caps. (This only applies if you want to connect to all this old stuff, like OS/2 or Win3.11, possibly up to Win98, haven't tried that, Win NT4 and newer should be fine)

Revision history for this message
TEN (launchpad-20-ten) wrote :

There is a tricky sequence of mostly undocumented steps to follow even for mount.cifs to make it work,
which has now been figured out thanks to several helpful experts on irc://irc.freenode.net/#samba-technical and irc://irc.freenode.net/#samba-os2.

One has to add several (comma-separated) parameters with -o to mount.cifs (with neither of them in its man page):

1. servernetbiosname=MYHOST, shorthand for which is servern=MYHOST
This will work around the
mount error 112 = Host is down
caused by mount.cifs asking for a wildcard *SMBSERVER instead, which query is not answered by older systems such as OS/2 Warp 4 or Windows at least up to Windows 98 Second Edition.

This "successfully" takes you to a
mount error 95 = Operation not supported
to remedy which the next step is to add:

2. sec=lanman
This fails with a
mount error 22 = Invalid argument
because the cifs.ko module need to be rebuilt with the following uncommented in the kernel .config:
CONFIG_CIFS_WEAK_PW_HASH

Having to install the kernel sources and recompile means this is feasible only for the most enterprising users, and has taken years to sort out even with eminent experts subscribed to the upstream bug (in which further aspects that are not distribution-specific shall be addressed at https://bugzilla.samba.org/show_bug.cgi?id=1353).

To avoid such issues preventing connectivity with many systems that are otherwise still perfectly usable (and in widespread use) these days, Ubuntu kernels ought to come with the above option enabled unless there are compelling reasons making it inevitable for it to remain turned off.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package samba - 3.0.28a-0ubuntu1

---------------
samba (3.0.28a-0ubuntu1) hardy; urgency=low

  [Chuck Short]
  * New upstream release. This fixes the following Ubuntu bugs.
    - Prevent nmbd from shutting down when no network interfaces can be
      located. (LP: #180493)
    - Fixes I/O errors on access to SMB shares of OS/2. (LP: #112839)
  * Dropped patches:
    - make-distclean.patch
    - linux-cifs-user-perms.patch
    - cifs-umount-same-user.patch
    - get_global_sam_sid-non-root.patch
    - chgpasswd.patch
    - cups.patch
    - samba-syslog.patch
  * debian/mksambapasswd.awk
    - Don't add user with UID less than 1000 to smbpasswd. (LP: #199412)
  * debian/samba.if-up
    - ifup hook to reload samba once the interfaces comes up. (LP: #180493)
  * Updated control version.

  [Nicolas Valcárcel]
  * debian/patches/fix-documentation.patch
    - Fixed some escape typos in smb.conf(5) manpage. (LP: #182571)

  [Shawn Smith]
  * debian/samba.init
    - Samba init script does not conform to the LSP specification; it needs a
      status section (LP: #39157)

 -- Chuck Short <email address hidden> Tue, 11 Mar 2008 14:21:29 -0400

Changed in samba:
status: Confirmed → Fix Released
Revision history for this message
TEN (launchpad-20-ten) wrote :

As has been concluded on irc://irc.freenode.net/#samba-os2, Samba 3.0.28a will not have fixed "I/O errors on access to SMB shares of OS/2. (LP: #112839)" - the kernel has to be compiled with CONFIG_CIFS_WEAK_PW_HASH enabled by default, otherwise this bug will persist.

Revision history for this message
Felix Miata (mrmazda) wrote :

I confirm validity of TEN's comment 8 using 2.6.24-12-generic and 3.0.28a.

Revision history for this message
TEN (launchpad-20-ten) wrote :
Revision history for this message
TEN (launchpad-20-ten) wrote : Solved in Ubuntu 8.04: I/O error on access to SMB shares of OS/2 Warp 4 host mounted in Ubuntu

mount.cifs /myhost/MYSHARE /mnt/gatekeeper -o username=myself,servern=MYHOST,sec=lanman
works for me in Ubuntu 8.04 "Hardy Heron", making e.g. OS/2 shares finally accessible again after all these years.

(As a welcome side effect of the improvements in Samba support, printing via SMB now works out of the box without any of the prior versions' hassles: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/60931)

Unlike the share name (which will automatically be retried in uppercase by mount.cifs if not specified this way already), the server name now has to specified additionally in uppercase as servern=MYHOST in the above example; otherwise an ambiguous "mount error 2 = No such file or directory" will be reported.

Przemek K. (azrael)
Changed in samba (Baltix):
status: New → Fix Released
Changed in samba:
status: Confirmed → Won't Fix
Changed in samba:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.