File: smbmount.txt

package info (click to toggle)
samba 2.0.7-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 20,492 kB
  • ctags: 11,959
  • sloc: ansic: 98,607; sh: 4,116; perl: 858; makefile: 747; awk: 183; csh: 164
file content (100 lines) | stat: -rw-r--r-- 3,664 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
!==
!== smbmount.txt for Samba release 2.0.7 26 Apr 2000
!==
Date:           October 15, 1999
Contributor:    Urban Widmark <urban@svenskatest.se>

Subject:        smbmount usage and mount.smb
===============================================================================

Words
-----

smbfs      - A filesystem that gives you access to a SMB share as a filesystem.
             This is done as a normal kernel filesystem. Currently this is for
             Linux only.
smbmount   - The program that does the initial SMB setup with the server.
mount.smb  - A link to smbmount that is created (always in /sbin) when you
             install samba.


What's going on?
----------------

The syntax for mounting SMB shares has been changed so that shares can
be mounted with the normal mount command. When giving a -t smbfs flag to
mount it knows to call an external mount program, mount.smb. With the
new syntax, smbmount can be that mount.smb (through a symlink).

This requires a recent enough version of the mount program for Linux,
you almost certainly have this (exact util-linux version anyone?).

With the new format you should not have to call smbmount/mount.smb
directly. Instead you do something like this:

  mount -t smbfs -o user=tridge,passwd=foobar //fjall/test /data/test

The current list of options are:
      username=<arg>                  SMB username
      password=<arg>                  SMB password
      netbiosname=<arg>               source NetBIOS name
      uid=<arg>                       mount uid or username
      gid=<arg>                       mount gid or groupname
      port=<arg>                      remote SMB port number
      fmask=<arg>                     file umask
      dmask=<arg>                     directory umask
      debug=<arg>                     debug level
      ip=<arg>                        destination host or IP address
      workgroup=<arg>                 workgroup on destination
      sockopt=<arg>                   TCP socket options
      scope=<arg>                     NetBIOS scope
      guest                           don't prompt for a password
      ro                              mount read-only
      rw                              mount read-write

If you already have a mount.smb script you probably do not need it
anymore.


/etc/fstab
----------

One of the advantages with this setup is that you can put entries for
smbfs in your fstab.


autofs
------

mount.smb makes autofs integration much easier, since it is now
"yet-another-filesystem".

Before, autofs had to parse the given options and then send them to
smbmount in the right format. This "right format" changed between
1.9.x and 2.0.x (and even between 2.0 versions). That is a pain when
multiple packages are involved, this new setup should be a cleaner
interface.

The only thing that now changes if smbclient changes options are what
you have to put in your autofs maps.

Example /etc/autofs.data:
test -fstype=smb,username=tridge,password=foobar,uid=123 ://fjall/test


Strange dates
-------------

This really has nothing to do with smbclient, but if you are using
smbfs you're likely to read this file when you run into problems so I
put ithere anyway ... :)

In older versions of Linux (before 2.2.10) smbfs did not automatically
recognise some buggy win95 servers. Instead there was an option for a
workaround that could be set at compile time. The problem with setting
that option was that it would give funny dates when looking at shares
from a NT box.

Upgrade to the latest 2.2 version (2.2.12 is fine) if you are having
this problem. RedHat 6.0 comes with a kernel that is compiled with
this option set.