summaryrefslogtreecommitdiffstats
path: root/examples/autofs/mount-smb.doc
blob: 7eee74fce0dc05d2bb692282193be1827048d530 (plain)
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
Date: 		Tue, 07 Apr 1998 
Contributor: 	Christoph L. Spiel <Christoph_Spiel@physik.tu-muenchen.de>
Organization:	Munich Institute of Technology, Institute E10
Subject:	WISHES:LINUX:smbmount
===============================================================================
Machine Arch: i386
Machine OS: linux
Kernel: 2.1.85
Samba Version: Version 1.9.18p3
Mount Version: 2.7i
Autofs Version: 0.3.14


Hi SAMBA developers!

I have written a shell script that marries smbmount and mount
on a Linux-machine with a 2.1.55+ kernel (i.e., a newer developper
kernel.  Especially it makes smbmount compatible
with autofs!  Now, You (when root :-) can say
	mount -t smb /win-machine/my-share /mntpt
Concerning the management of the user/password-pairs I have already
made a step in the right direction, but there is still a lot of
brain-work to do :-(

The primary problem with the Win passwords
is that they are under user-control, and not under admin-control
as the Linux passwords are.  Therfore, I give every SAMBA user
a
	~/smb-pass
file where she can manage her usernames and passwords herself.
The fundamental mount-tables /etc/fstab and /etc/auto.* only
list the mount-point and the respective options.  The user´s
password file is adressed via the uuname=<user_name>-option.

An important "side-effect" is that the password file need not to
be word-readable.  In fact my script tests for user-only rights of
this file to close this potential security-hole.

The script mount.smb has to be installed in /sbin and given mode 755.
No suid is necessary!  I attached an automount table that is currently
in use on my machine.  A user´s password file looks like this:

$ cat ~/smb-pass
supra:/cspiel   cspiel  secret
helium:/c       cspiel  sesame
^               ^       ^
|               |       +- password
|               +- username
+- share-name as in fundamental mount-table.

It would be nice, if someone else tests my script.  Maybe, You have
already found a better solution than mine.  If You find it useful,
I would be glad to donate it to the SAMBA-project.

BUGS:
(1) There is no documentation yet.  (Yes, I consider this a bug!)
(2) When used with autofs the automounter overruns mount.smb.
    This means when accessing an automounted share for the 1st time
    You may get an empty directory.  Retrying several times will
    cause the mount to complete successfully.


Best,
	Christoph Spiel