smbfs works!

Steven N. Hirsch (shirsch@ibm.net)
Sat, 6 Dec 1997 17:17:06 -0500 (EST)


Bill,

I guess the third, err, tenth time is the charm here. File dates now work
correctly on WfW 3.11 shares. I also tested against my Alpha UDB running
NT Workstation 4.0 with no problems. Quite a battle, but you won <g>.

It would be lovely if smbclient could have an alternate personality when
invoked by the name 'smbmount'. By looking at argv[0], it could
switch to a functional emulation of the older smbmount utility. This
would be far less confusing to the novice user, and make automounter maps
quite a bit simpler.

And, here's something interesting I've noticed: My .bashrc file sets this
up:

alias dir="~/bin/dir"

(Don't ask me why, it's dated from the early days of my Unix experience..)

where ~/bin/dir looks like:

#!/bin/sh
/bin/ls -lAF $@ | more

causes this effect:

Script started on Sat Dec 6 17:10:16 1997

(hirsch@cy) ~ : cd /tmp/smb

(hirsch@cy) /tmp/smb : ~/bin/dir
total 934
drwxr-xr-x 1 hirsch system 512 Nov 9 14:14 ACROREAD/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:14 AIR_C/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:14 AIR_EISA/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:14 APLWIN/
-rwxr-xr-x 1 hirsch system 11440 Oct 5 1992 ASPI4DOS.SYS*

(snip!)

drwxr-xr-x 1 hirsch system 512 Nov 9 14:38 WINDOWS/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:42 WINFAX/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:43 WINZIP/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:43 WORK/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:43 XGA$DMQS/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:43 XGAPCDOS/
drwxr-xr-x 1 hirsch system 512 Nov 9 14:44 XWIN32/

(hirsch@cy) /tmp/smb : cd temp

(hirsch@cy) /tmp/smb/temp : ~/bin/dir
shell-init: could not get current directory: getwd: cannot access parent directories
job-working-directory: could not get current directory: getwd: cannot access parent directories
total 2218
-rwxr-xr-x 1 hirsch system 547485 Sep 15 1996 100ADISK.EXE*
-rwxr-xr-x 1 hirsch system 24257 Sep 15 1996 100ALM.EXE*
-rwxr-xr-x 1 hirsch system 186985 Oct 20 1996 6X86-COM.PS*
-rwxr-xr-x 1 hirsch system 250866 Oct 20 1996 6X86-MUL.PS*
-rwxr-xr-x 1 hirsch system 137609 Oct 20 1996 6X86-SET.PS*
-rwxr-xr-x 1 hirsch system 138340 Oct 12 1996 7880UTIL.EXE*
-rwxr-xr-x 1 hirsch system 288172 May 4 1997 ACOMPUTE.PDF*
-rwxr-xr-x 1 hirsch system 24405 May 1 1997 ATARIDSK.ZIP*
-rwxr-xr-x 1 hirsch system 13200 May 8 1991 ATARIFMT.EXE*
drwxr-xr-x 1 hirsch system 512 Nov 9 14:37 BENCH/
-rwxr-xr-x 1 hirsch system 9086 May 8 1991 ST2IBM.COM*
-rwxr-xr-x 1 hirsch system 323474 May 4 1997 STHARD.PDF*
-rwxr-xr-x 1 hirsch system 320734 May 4 1997 SYSTEM.PDF*
drwxr-xr-x 1 hirsch system 512 Nov 9 14:37 WORK/

(hirsch@cy) /tmp/smb/temp : cd ../TEMP

(hirsch@cy) /tmp/smb/TEMP : ~/bin/dir
total 2218
-rwxr-xr-x 1 hirsch system 547485 Sep 15 1996 100ADISK.EXE*
-rwxr-xr-x 1 hirsch system 24257 Sep 15 1996 100ALM.EXE*
-rwxr-xr-x 1 hirsch system 186985 Oct 20 1996 6X86-COM.PS*
-rwxr-xr-x 1 hirsch system 250866 Oct 20 1996 6X86-MUL.PS*
-rwxr-xr-x 1 hirsch system 137609 Oct 20 1996 6X86-SET.PS*
-rwxr-xr-x 1 hirsch system 138340 Oct 12 1996 7880UTIL.EXE*
-rwxr-xr-x 1 hirsch system 288172 May 4 1997 ACOMPUTE.PDF*
-rwxr-xr-x 1 hirsch system 24405 May 1 1997 ATARIDSK.ZIP*
-rwxr-xr-x 1 hirsch system 13200 May 8 1991 ATARIFMT.EXE*
drwxr-xr-x 1 hirsch system 512 Nov 9 14:37 BENCH/
-rwxr-xr-x 1 hirsch system 9086 May 8 1991 ST2IBM.COM*
-rwxr-xr-x 1 hirsch system 323474 May 4 1997 STHARD.PDF*
-rwxr-xr-x 1 hirsch system 320734 May 4 1997 SYSTEM.PDF*
drwxr-xr-x 1 hirsch system 512 Nov 9 14:37 WORK/

(hirsch@cy) /tmp/smb/TEMP : exit
exit

Script done on Sat Dec 6 17:11:03 1997

As you can see, the child shell process gets confused when started in a
directory where (I surmise) smbfs is translating my 'cd' parameters to
upper-case. This also occurs under NT when I enter an uppercase directory
using a lower-case alias.

Not sure if anything can be done about this, but thought I'd mention it.
As a point of reference, the smbfs support in 2.0.x kernels mapped
everything under FAT filesystems to lower case (which I think looks
better). However, given the Win95 and NT support for long file names and
mixed case, there doesn't seem to be a clear win..

Steve