[PLUG] Syntax to connect to network drive

Carlos Konstanski ckonstanski at pippiandcarlos.com
Sun Oct 15 16:42:04 UTC 2006


Uh, yeah, sorry about forgetting to mention you need to be root.  My
bad.

I'd look for smbmount or mount.smbfs with apt-cache search.  You really
want to use one of these wrapper programs, rather than going the "mount
-t smbfs" route.

Can you access the share with smbclient?  That would be a good
troubleshooting measure to take.  Maybe also try konqueror or nautilus,
if you're a GUI guy.  Using these tools will help you identify share and
NTFS permission issues.  Remember, BOTH share AND NTFS permissions come
into play with winblows shares.  You get the more restrictive of the
two.

Can you access the share from another winblows box on your network?  If
not, time to haul out ethereal (now called wireshark).  Filter for TCP
ports 138 and 139, and UDP ports 137 and 138.  Let a packet trace run
for quite a while (a half hour).  Then look for all packets whose
protocol is "BROWSER".  See if anything looks fishy.  For instance, are
two or more machines battling for master browser?

The kernel config needs to be checked for CIFS support.  In "make
menuconfig":

File systems  --->
     Network File Systems  --->
         <*> SMB file system support (to mount Windows shares etc.)
             [*]   Use a default NLS
             (cp437) Default Remote NLS Option
             <*> CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)
             [*]   CIFS statistics
             [*]     CIFS extended statistics
             [*]   CIFS extended attributes
             [*]     CIFS POSIX Extensions
             [ ]   CIFS Experimental Features (EXPERIMENTAL)

This is how I have my CIFS options set, and it works (even in an AD
domain).  Some settings may be optional.

You are using an appliance router, correct?  In this case, it is highly
unlikely that your machines are getting weird netbios settings from
DHCP.  But it might be worth a check.  For instance, DHCP can tell
clients where to find the wins server, and also whether they should
be allowed to broadcast or not.

The above steps are not in proper order.  I would check the kernel
config first, as that is quick and easy to do, and you'll get nowhere if
it isn't right.  It may be that smbclient (and its GUI companions,
konqueror and nautilus) don't require kernel support.  These may be
tried first as well.  Calling in another winblows box would be dead last
on my list.

Carlos Konstanski

On Sat, 14 Oct 2006, John Jason Jordan wrote:

> Date: Sat, 14 Oct 2006 23:55:34 -0700
> From: John Jason Jordan <johnxj at comcast.net>
> Reply-To: "General Linux/UNIX discussion and help;	civil and on-topic"
>     <plug at lists.pdxlinux.org>
> To: plug at lists.pdxlinux.org
> Subject: Re: [PLUG] Syntax to connect to network drive
> 
> On Sat, 14 Oct 2006 23:53:34 -0600 (MDT)
> Carlos Konstanski <ckonstanski at pippiandcarlos.com> dijo:
>
>> First, mount the USB volume:
>>
>>      mkdir /mnt/smb
>>      smbmount "//<windows-box-netbios-name>/g$" /mnt/smb
>>
>> Then rsync to /mnt/smb/Backups.  If ubuntu does not have a smbmount
>> command, look for mount.smbfs or the like.
>>
>> Note the g$ notation.  Winblows uses $ for hidden shares.  By default,
>> every volume can be accessed this way.  Try it on your co-workers'
>> machines!
>
> Ah! Now I see things much more clearly. It did not occur to me to
> *mount* the share.
>
> OK, there is still a problem. First, I went to the Windows desktop and
> rearranged things a bit. That is, I just created a new share
> (Linux_Backups) so I could mount something with a name I could
> remember. Then I tried:
>
> mkdir /media/smb
> smbmount "//Devil4/Linux_Backups" /media/smb
>
> And I got "Command not found." So I tried "mount.smbfs" and got the
> same error. After googling a bit it appears what I need is (with sudo):
>
> jjj at Devil5:~$ sudo mount -t smbfs "//Devil4/Linux_Backups" /media/smb
>
> That command finally worked, except I got the following error:
>
> mount: wrong fs type, bad option, bad superblock
> on //Devil4/Linux_Backups, missing codepage or other error
>       In some cases useful info is found in syslog - try
>       dmesg | tail  or so
>
> So I tried:
>
> jjj at Devil5:~$ dmesg | tail
> [   72.838511] NET: Registered protocol family 31
> [   72.838516] Bluetooth: HCI device and connection manager initialized
> [   72.838542] Bluetooth: HCI socket layer initialized
> [   72.863627] Bluetooth: L2CAP ver 2.8
> [   72.863638] Bluetooth: L2CAP socket layer initialized
> [   72.903849] Bluetooth: RFCOMM socket layer initialized
> [   72.903895] Bluetooth: RFCOMM TTY layer initialized
> [   72.903899] Bluetooth: RFCOMM ver 1.7
> [20318.857225] audacity[26445]: segfault at 0000000000000000 rip
> 00002aaaad0d36d0 rsp 00007fffffc1aeb0 error 4 [27136.988451]
> smb_fill_super: missing data argument
>
> Forget the stuff about Bluetooth -- this computer doesn't even have
> Bluetooth. And I was running Audacity earlier; something must have gone
> wrong with it. The important line I think is the last one:
>
> [27136.988451] smb_fill_super: missing data argument
>
> Unfortunately, I don't know what it might mean.
>
> It's too late at night to think any more. Tomorrow morning I may get
> more ideas. In the meantime, additional suggestions are welcome.
>
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



More information about the PLUG mailing list