From: Martin Wilck <martin.wilck@ts.fujitsu.com>
To: Ian Kent <raven@themaw.net>
Cc: "autofs@vger.kernel.org" <autofs@vger.kernel.org>
Subject: Re: [PATCH 2/2, 2nd attempt] samples/auto.smb: add logic to obtain credentials
Date: Fri, 06 Sep 2013 10:23:52 +0200 [thread overview]
Message-ID: <52299118.4080103@ts.fujitsu.com> (raw)
In-Reply-To: <1378454358.2311.1.camel@perseus.fritz.box>
On 09/06/2013 09:59 AM, Ian Kent wrote:
>> -$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
>> +creds=/etc/creds/$key
>> +if [ -f "$creds" ]; then
>> + opts="$opts"',uid=$UID,gid=$GID,credentials='"$creds"
>> + smbopts="-A $creds"
>> +else
>> + get_krb5_cache
>> + if [ -n "$cache" ]; then
>> + opts="$opts"',multiuser,cruid=$UID,sec=krb5i'
>> + smbopts="-k"
>> + export KRB5CCNAME=$cache
>> + else
>> + opts="$opts"',guest'
>
> Why add guest?
"guest" means "don't prompt for a password" which is what mount.cifs
will attempt to do if no credentials are available already (e.g. via
kerberos ticket). IMO that's what's needed for autofs, otherwise the
mount attempt might hang waiting for password input.
> Is that going to change the behavior of the existing script.
"guest" mode was all the previous script could do, thus it seems to have
been written with servers in mind that only offered guest access in the
first place (und thus wouldn't prompt for a password, either).
Martin
--
Dr. Martin Wilck
PRIMERGY System Software Engineer
x86 Server Engineering
FUJITSU
Fujitsu Technology Solutions GmbH
Heinz-Nixdorf-Ring 1
33106 Paderborn, Germany
Phone: ++49 5251 525 2796
Fax: ++49 5251 525 2820
Email: martin.wilck@ts.fujitsu.com
Internet: http://ts.fujitsu.com
Company Details: http://ts.fujitsu.com/imprint
next prev parent reply other threads:[~2013-09-06 8:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51081EF4.20105@ts.fujitsu.com>
[not found] ` <1359549686-7246-1-git-send-email-martin.wilck@ts.fujitsu.com>
[not found] ` <1359549686-7246-3-git-send-email-martin.wilck@ts.fujitsu.com>
2013-09-06 7:59 ` [PATCH 2/2, 2nd attempt] samples/auto.smb: add logic to obtain credentials Ian Kent
2013-09-06 8:23 ` Martin Wilck [this message]
2013-09-06 9:26 ` Ian Kent
2013-09-06 9:40 ` Martin Wilck
2013-09-07 7:29 ` Ian Kent
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=52299118.4080103@ts.fujitsu.com \
--to=martin.wilck@ts.fujitsu.com \
--cc=autofs@vger.kernel.org \
--cc=raven@themaw.net \
/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.