All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Brooks" <r.s.brooks-EkmVulN54Sk@public.gmane.org>
To: <linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: RE: Unable to mount using credentials file
Date: Mon, 3 Nov 2014 08:54:03 +0100	[thread overview]
Message-ID: <003101cff73b$57fa8240$07ef86c0$@ieee.org> (raw)
In-Reply-To: 

P.S.  mount in BusyBox v1.21.1 does list a verbose option (-v) in its help, but its output (in both cases) is no different from that of mount in BusyBox v1.16.
Presumably I could fix this by installing a "real" mount command and breaking the link to BusyBox, but I don't find it worth the effort, since I can call mount.cifs directly.
Thanks again for all of your help!

Sorry, Gunter, I don't have strace:

-ash: strace: not found

mount.cifs is located at:

/usr/syno/bin/mount.cifs

I suspect that the installed version of mount (from BusyBox 1.16) is too old to correctly handle "-o credentials=<file>".
I will try installing a newer version (BusyBox 1.21) and report back later.

However, this no longer has a high priority for me, as I can live with calling mount.cifs directly.

@Steve,
mount.cifs is only v5.5 in my installation, but since calling it directly works fine, I presume that the problem lies with the BusyBox version of mount and not with mount.cifs.
Since mount works with "-o username=<user>,password=<password>", I presume that it is finding mount.cifs, but is not passing "-o credentials=<file>" correctly.

Thanks for all of your help!

-----Original Message-----
From: Günter Kukkukk [mailto:linux-KQewbsS9MvBBDgjK7y7TUQ@public.gmane.org]
Sent: Monday, November 3, 2014 12:50 AM
To: Roger Brooks; linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Unable to mount using credentials file

Am 02.11.2014 um 17:50 schrieb Roger Brooks:
> Here is the output from mount -t cifs --verbose -o ... for the failing case:
> mount: mounting //<IP address>/<share> on /mnt/<mountpoint>/ failed: 
> Invalid argument There is still no output when I add --verbose to the successful case.
> There is no verbose option listed for mount --help.
> Thanks for your help.

you can also try strace (hopefully available) like:

strace -f mount -t cifs --verbose //server/share /mnt -o .....

look, whether mount.cifs is found or not.

Btw - where is your mount.cifs installed (absolute path)?

Cheers, Günter

> 
> -----Original Message-----
> From: Steve French [mailto:smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
> Sent: Sunday, November 2, 2014 5:30 PM
> To: Roger Brooks
> Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Subject: Re: Unable to mount using credentials file
> 
> mount with call mount.cifs (if it is present in /sbin) when you specify "mount -t cifs"
> 
> You can specify --verbose before the -o (see
> http://linux.die.net/man/8/mount.cifs) and it will show the mount 
> options being passed in to the kernel syscall so it would be useful 
> for debugging to compare the exact parameters being passed in to the 
> kernel in the working vs. failing case by specifying --verbose before 
> the -o
> 
> On Sun, Nov 2, 2014 at 4:09 AM, Roger Brooks <r.s.brooks-EkmVulN54Sk@public.gmane.org> wrote:
>> P.S. To answer my own question below, experimentation shows that mount and umount still fulfill their normal functions for volumes mounted directly with mount.cifs.
>> So, much as it irritates me not to know why mount -o credentials doesn't work, I can live with using mount.cifs instead.
>> Thanks to all who responded!
>>
>> Thanks for the tips, Steve!
>>
>> My version of mount:
>> BusyBox v1.16.1 (2014-10-10 08:37:09 CST) multi-call binary.
>> does not appear to have a verbose option. At least:
>> mount --help
>> does not list any such option, and mount does not return any information to the console when it succeeds, regardless of whether or not I specify -v.
>>
>> The failure message is also unchanged with the -v option:
>> mount: mounting //<IP address>/<share> on /mnt/<mountpoint> failed: 
>> Invalid argument
>>
>> Also, I have read that mount maintains /etc/mtab.
>> Does that mean that mount will not list volumes which I mounted directly with mount.cifs, and that I cannot use umount to unmount volumes mounted directly with mount.cifs?
>>
>> -----Original Message-----
>> From: Steve French [mailto:smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
>> Sent: Saturday, November 1, 2014 5:24 PM
>> To: Roger Brooks
>> Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> Subject: Re: Unable to mount using credentials file
>>
>> using /sbin/mount.cifs directly should be fine.   When you mount with
>> verbose mount option does it show any useful differences between the 
>> two cases (working vs. failing)
>>
>> On Sat, Nov 1, 2014 at 11:21 AM, Roger Brooks <r.s.brooks-EkmVulN54Sk@public.gmane.org> wrote:
>>> P.S.
>>> There was a non-printing character in the directory name under /root.
>>> After correcting that, mount.cifs -o credentials=<filename> works.
>>> However, mount -t cifs -o credentials=<filename> still returns "Invalid argument".
>>> Can I just use mount.cifs directly, or does mount perform some additional needed housekeeping?
>>> If mount is needed, how can I get -o credentials to work?
>>> TIA for any tips!
>>>
>>> Hi Benjamin,
>>>
>>> Thanks for responding.
>>>
>>> The credentials file is a simple text file created with vi containing the lines:
>>>>>
>>> username=<user>
>>> password=<password>
>>> <<
>>> I have tried this both with and without trailing newline at the end of the second line.
>>>
>>> I have also tried the variant:
>>>>>
>>> username=<user>
>>> password=<password>
>>> domain=<domain>
>>> <<
>>>
>>> The results are always the same.
>>> If there is a problem with the *content* of the file, why would the error message say that the file could not be opened?
>>>
>>> Thanks for your help!
>>> Best Regards,
>>> Roger
>>>
>>> From: Benjamin Bellec [mailto:b.bellec-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org]
>>> Sent: Saturday, November 1, 2014 1:34 PM
>>> To: Roger Brooks
>>> Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> Subject: Re: Unable to mount using credentials file
>>>
>>> Hi,
>>> Does your credential file is correctly formatted ?
>>>
>>> 2014-11-01 13:03 GMT+01:00 Roger Brooks <r.s.brooks-EkmVulN54Sk@public.gmane.org>:
>>> I am attempting to mount Windows volumes on a Synology DS (running DSM 5.0, a Debian-based distribution).
>>> Command lines of the form:
>>> mount -t cifs -o username=<user>,password=<pass> //<IP address>/share/ /mnt/<mountpoint> succeed.
>>> However, command lines of the form:
>>> mount -t cifs -o credentials=<filename> //<IP address>/share/ /mnt/<mountpoint> fail with the error "Invalid argument".
>>> For diagnostic purposes, I have attempted to mount the volumes directly using mount.cifs (v5.5).
>>> Once again, commands of the form:
>>> mount.cifs //<IP address>/<share> /mnt/<mountpoint>/ -o 
>>> username=<user>,password=<password>
>>> succeed.
>>> However, commands of the form:
>>> mount.cifs //<IP address>/<share> /mnt/<mountpoint>/ -o credentials=<file> fail with the error message:
>>> error -1 (Unknown error 4294967295) opening credential file <file> 
>>> This is the case regardless of the location of the file (see
>>> http://samba.2283325.n4.nabble.com/Error-s-opening-credentials-file-
>>> t
>>> d
>>> 2518214.html) or its privileges.  The error persists, even when the 
>>> command is executed from a root session and the credentials file has permissions 0777 and is in a subdirectory of /root.
>>> How can I get mount to work using a credentials file?
>>>
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-cifs"
>>> in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo 
>>> info at  http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-cifs"
>>> in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo 
>>> info at  http://vger.kernel.org/majordomo-info.html
>>
>>
>>
>> --
>> Thanks,
>>
>> Steve
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-cifs" 
>> in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo 
>> info at  http://vger.kernel.org/majordomo-info.html
> 
> 
> 
> --
> Thanks,
> 
> Steve
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" 
> in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo 
> info at  http://vger.kernel.org/majordomo-info.html
> 


-- 

      parent reply	other threads:[~2014-11-03  7:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-01 12:03 Unable to mount using credentials file Roger Brooks
     [not found] ` <CANzfOVLmYUWPoTD8zF7oDFJ-XR57sPTBH=yJQ4mzPd2zgapFog@mail.gmail.com>
2014-11-01 14:54   ` Roger Brooks
2014-11-01 16:21   ` Roger Brooks
2014-11-01 16:24     ` Steve French
     [not found]       ` <CAH2r5mupp47fyNw7t_EEvdQSzk-oNPNm8C9vfdNSvbMqr6GcPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-02  7:44         ` Roger Brooks
2014-11-02 10:09       ` Roger Brooks
2014-11-02 15:59         ` Günter Kukkukk
2014-11-02 16:29         ` Steve French
     [not found]           ` <CAH2r5mur=q=nJhpYWRRK_6CQgxYF067pxpiCtnHWQ3y9NiXX5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-02 16:50             ` Roger Brooks
2014-11-02 18:58               ` Steve French
2014-11-02 23:49               ` Günter Kukkukk
     [not found]                 ` <5456C316.90308-KQewbsS9MvBBDgjK7y7TUQ@public.gmane.org>
2014-11-03  7:34                   ` Roger Brooks
2014-11-03 14:40                     ` Steve French
     [not found]                       ` <CAH2r5mvxygva+WL2ExeWNky5GdbF88hJwOdcQQshoxPTrTnZeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 13:31                         ` Roger Brooks
2014-11-03  7:54                 ` Roger Brooks [this message]

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='003101cff73b$57fa8240$07ef86c0$@ieee.org' \
    --to=r.s.brooks-ekmvuln54sk@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.