Gentoo Archives: gentoo-server

From: Alexander Zimmerling <Alexander.Zimmerling@××××.org>
To: gentoo-server@l.g.o
Subject: [gentoo-server] Mount Samba shares as home
Date: Thu, 17 Apr 2008 15:26:26
Message-Id: 1208445982.5312.20.camel@Jerusalem.zimmerling.lan
1 Hi guys,
2
3 I've got a nice problem here.
4
5 My situation:
6
7 I have different clients, windows and linux and a gentoo-samba-pdc.
8
9 As you might know, windows domains are supporting a 'homeshare' which
10 are mounted (mapped) to a specific driveletter (here m:)
11
12 The windows boxes are domain members. The linux boxes aren't.
13 Some of the users need to login to windows and linux clients. The
14 linux-usernames are unfortunately not equal with the domain-usernames.
15
16 The generel problem is to provide the logged in linux user the
17 corresponding (domain-user) homeshare.
18
19 Postings in the forums pointed me to pam_mount.
20
21 I'll give you an example:
22
23 Colleague Bob Example.
24
25 Has a domain-user-login, bob.example. He can login on all windows
26 workstations without any trouble, the share is mapped to m: etc.
27
28 He has a linux username, also. Just "bob".
29
30 Bob is an unprivileged user and using this command ends in an error:
31
32 >>
33 mount.cifs //server/bob.example /home/bob -o user=bob.example
34 <<
35
36 error returned:
37 >>
38 mount error 1 = Operation not permitted
39 Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
40 <<
41
42
43 As I said the guys in the forum told me to look for pam_mount.
44 I installed this module, set it up in /etc/pam.d/system-auth and
45 configured the /etc/security/pam_mount.conf.xml
46
47 added this line:
48
49 >>
50 <volume user="bob" fstype="cifs" server="server" path="bob.example"
51 options="user=bob.example">
52 <<
53
54 I saw, that pam_mount uses $(user) to identify the user, and pass this
55 to mount.cifs. I've deleted this part and added
56 options="user=bob.example".
57
58 Well this is where I'm stucked now.
59
60 The main problem is that the username on the old linux boxes differing
61 from the domain user names.
62
63 Do you have any ideas or a better documentation for pam_mount? or had
64 sth similar?
65
66 Kind Regards
67
68 Alex

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-server] Mount Samba shares as home robert anstuther <robert.anstruther@×××××.biz>