From: Milan =?UTF-8?Q?Kn=C3=AD=C5=BEek?= Subject: Re: mount.cifs multiuser w/o krb5? How? Date: Sat, 07 Jul 2012 00:09:53 +0200 Message-ID: <1341612593.26748.9.camel@athlon.garagome> References: <1341427937.3252.6.camel@athlon.garagome> <20120706141543.1b564c11@tlielax.poochiereds.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jeff Layton Return-path: In-Reply-To: <20120706141543.1b564c11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org> Sender: linux-cifs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Jeff Layton p=C3=AD=C5=A1e v P=C3=A1 06. 07. 2012 v 14:15 -0400: Hello Jeff, > On Wed, 04 Jul 2012 20:52:17 +0200 > Milan Kn=C3=AD=C5=BEek wrote: > > To move on for multiuser: adding the credentials to the keyring: > > [user1@client /]$ cifscreds add server > > and typing in the password. > >=20 > > (Similarly for user2.) > >=20 > > When I remount the same share with "multiuser" option with the > > credentials of user1, the share is accessible only by the root user= , the > > users user1 and user2 cannot list the mount point (cannot access /m= nt: > > Permission denied) > >=20 >=20 > Can you clarify exactly what you did above? How, exactly did you > remount the share? I actually unmounted and mounted again with the extra "multiuser" option. > > Adding cifscreds has exit code 0. Running "cifscreds clearall" resu= lts > > in "You have no stashed cifs credentials. If you want to add them u= se: > > cifscreds add" and exit code 1. That's weird. > >=20 >=20 > After you do the "cifscreds add", if you then do a "keyctl show" does > it show the cifs keys attached to your session keyring? >=20 > One thing that may be biting you: cifscreds attaches the keys to the > session keyring. If you do the "add" in one session and then try to > access from another, it won't work since the keys just aren't present= =2E > The fact that "clearall" doesn't find any creds leads me to suspect > that's what's going on here. >=20 > The scope of a "session" in keys parlance is unfortunately somewhat > poorly defined, but you basically need to do the "cifscreds add" from > each login. A graphical login on the console would be a single sessio= n > however. Hm, I will need to read more on the keyrings in kernel... Anyway, here are some details: [root@client /]# su - zmrzlinka [zmrzlinka@client ~]$ keyctl show Session Keyring 14048542 --alswrv 1001 -1 keyring: _uid_ses.1001 320075663 --alswrv 1001 -1 \_ keyring: _uid.1001 [zmrzlinka@client ~]$ cifscreds add -u zmrzlinka toillet Password: [blabla] [zmrzlinka@client ~]$ keyctl show Session Keyring 14048542 --alswrv 1001 -1 keyring: _uid_ses.1001 320075663 --alswrv 1001 -1 \_ keyring: _uid.1001 It does not seem to change anything. Is there a way how to add the key to the keyring using "keyctl" instead of "cifscreds" (for testing purposes)? Regards, Milan --=20 http://milan-knizek.net