first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
[kai/samba-autobuild/.git] / examples / autofs / mount-smb.doc
1 Date:           Tue, 07 Apr 1998 
2 Contributor:    Christoph L. Spiel <Christoph_Spiel@physik.tu-muenchen.de>
3 Organization:   Munich Institute of Technology, Institute E10
4 Subject:        WISHES:LINUX:smbmount
5 ===============================================================================
6 Machine Arch: i386
7 Machine OS: linux
8 Kernel: 2.1.85
9 Samba Version: Version 1.9.18p3
10 Mount Version: 2.7i
11 Autofs Version: 0.3.14
12
13
14 Hi SAMBA developers!
15
16 I have written a shell script that marries smbmount and mount
17 on a Linux-machine with a 2.1.55+ kernel (i.e., a newer developper
18 kernel.  Especially it makes smbmount compatible
19 with autofs!  Now, You (when root :-) can say
20         mount -t smb /win-machine/my-share /mntpt
21 Concerning the management of the user/password-pairs I have already
22 made a step in the right direction, but there is still a lot of
23 brain-work to do :-(
24
25 The primary problem with the Win passwords
26 is that they are under user-control, and not under admin-control
27 as the Linux passwords are.  Therfore, I give every SAMBA user
28 a
29         ~/smb-pass
30 file where she can manage her usernames and passwords herself.
31 The fundamental mount-tables /etc/fstab and /etc/auto.* only
32 list the mount-point and the respective options.  The user´s
33 password file is adressed via the uuname=<user_name>-option.
34
35 An important "side-effect" is that the password file need not to
36 be word-readable.  In fact my script tests for user-only rights of
37 this file to close this potential security-hole.
38
39 The script mount.smb has to be installed in /sbin and given mode 755.
40 No suid is necessary!  I attached an automount table that is currently
41 in use on my machine.  A user´s password file looks like this:
42
43 $ cat ~/smb-pass
44 supra:/cspiel   cspiel  secret
45 helium:/c       cspiel  sesame
46 ^               ^       ^
47 |               |       +- password
48 |               +- username
49 +- share-name as in fundamental mount-table.
50
51 It would be nice, if someone else tests my script.  Maybe, You have
52 already found a better solution than mine.  If You find it useful,
53 I would be glad to donate it to the SAMBA-project.
54
55 BUGS:
56 (1) There is no documentation yet.  (Yes, I consider this a bug!)
57 (2) When used with autofs the automounter overruns mount.smb.
58     This means when accessing an automounted share for the 1st time
59     You may get an empty directory.  Retrying several times will
60     cause the mount to complete successfully.
61
62
63 Best,
64         Christoph Spiel
65