Re: [PATCH 2/2, 2nd attempt] samples/auto.smb: add logic to obtain credentials

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx
Internet:		http://ts.fujitsu.com
Company Details:	http://ts.fujitsu.com/imprint
--
To unsubscribe from this list: send the line "unsubscribe autofs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux