All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Milan Knížek" <knizek.confy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: mount.cifs multiuser w/o krb5? How?
Date: Wed, 04 Jul 2012 20:52:17 +0200	[thread overview]
Message-ID: <1341427937.3252.6.camel@athlon.garagome> (raw)

Hello,

I would like to have a single cifs mount accessible by multiple users
allowing them to create files with their respective uid.

Having spent some time on RTFM and Google search on this mailing list,
it seems that the "multiuser" option of mount.cifs could make me happy.
And it should work now also for systems w/o krb5.


My intention is to avoid use of any directory services or domain (small
network of mainly linux clients). The test platform (both server and
client) are Arch linux, kernel 3.4.4-2-ARCH x86-64, cifs-utils 5.4-1.

The smb.conf on the server has
security = user
client ntlmv2 auth = yes

I can post full smb.conf, if needed. Users have the same uid on both
client and server.

>From the client, I am able to mount - as root - //server/share with
credentials of user1 and user1 can access the share. Mounting and
accessing works also for user2.

[root@client /]$ mount
//server/share on /mnt type cifs (rw,relatime,sec=ntlmv2,unc=\\server
\share,username=user1,domain=WORKGROUP,uid=0,noforceuid,gid=0,
noforcegid,addr=192.168.1.3,unix,posixpaths,serverino,acl,
rsize=1048576,wsize=65536,actimeo=1

To move on for multiuser: adding the credentials to the keyring:
[user1@client /]$ cifscreds add server
and typing in the password.

(Similarly for user2.)

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 /mnt:
Permission denied)

What do I do wrong?

Adding cifscreds has exit code 0. Running "cifscreds clearall" results
in "You have no stashed cifs credentials. If you want to add them use:
cifscreds add" and exit code 1. That's weird.

The manpage of cifscreds reads "The cifscreds utility requires a kernel
built with support for the login key type." What is the name of kernel
config option to check?

Further it reads "When a cifs filesystem is mounted with the "multiuser"
option, and does not use krb5 authentication, it needs to be able to get
the credentials for each user from somewhere. The cifscreds program is
the tool used to provide these credentials to the kernel."

However, man page of mount.cifs mentions "Because the kernel cannot
prompt for passwords, multiuser mounts are limited to mounts using sec=
options that don't require passwords." Does that include NTLMv2 or its
variants? Do I have to do something extra to let the kernel know about
the credentials?

Thanks for any hints.

Regards,
Milan
-- 
http://milan-knizek.net
About linux and photography (Czech only)

             reply	other threads:[~2012-07-04 18:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-04 18:52 Milan Knížek [this message]
     [not found] ` <1341427937.3252.6.camel-77nuZImz6nKt3pJmeLR6bw@public.gmane.org>
2012-07-06 18:15   ` mount.cifs multiuser w/o krb5? How? Jeff Layton
     [not found]     ` <20120706141543.1b564c11-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-07-06 22:09       ` Milan Knížek
     [not found]         ` <1341612593.26748.9.camel-77nuZImz6nKt3pJmeLR6bw@public.gmane.org>
2012-07-09 10:26           ` Jeff Layton
2012-07-10 21:01             ` knizek-VIXq6x/3rUk
2012-07-10 21:05             ` knizek-VIXq6x/3rUk
2012-07-11 19:05 Milan Knížek
2012-07-11 19:56 ` Jeff Layton
2012-07-11 19:06 Milan Knížek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341427937.3252.6.camel@athlon.garagome \
    --to=knizek.confy-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.