define defaults for mount -t cifs

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

define defaults for mount -t cifs

Samba - General mailing list
Hi,

Is there a place where I can specify defaults options a for "mount -t cifs"?

I would like to change the default protocol version to vers=2.1

Is there something like a cifs.conf or such...?

MJ

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: define defaults for mount -t cifs

Samba - General mailing list
Hi,

mj via samba <[hidden email]> writes:
> Is there a place where I can specify defaults options a for "mount -t cifs"?
>
> I would like to change the default protocol version to vers=2.1
>
> Is there something like a cifs.conf or such...?

No, there isn't. You can add entries in your fstab file with share,
mountpoints and options there but that has to be done for each share you
plan to mount, probably not what you want.

You could make a wrapper script around mount.cifs that would check or add
the vers option. Something like this pseudo code:

    if "vers" in $opts:
        if val("vers", $opts) < 2.1:
            err("min supported version is 2.1")
    else:        
        set("vers", $opts, 2.1)
     
    call mount.cifs $share $mnt -o $opts
   

--
Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: define defaults for mount -t cifs

Samba - General mailing list
Hai MJ,

Have you tried:

apt-get install cifs-utils if its not installed.
man mount.cifs  ( if cifs-utils isnt installed no mount.cifs on debian.)

And test with :
mount.cifs //server/share /mnt/point -o vers=2.1

Greetz,

Louis



> -----Oorspronkelijk bericht-----
> Van: samba [mailto:[hidden email]] Namens
> Aurélien Aptel via samba
> Verzonden: vrijdag 19 mei 2017 11:07
> Aan: mj; [hidden email]
> Onderwerp: Re: [Samba] define defaults for mount -t cifs
>
> Hi,
>
> mj via samba <[hidden email]> writes:
> > Is there a place where I can specify defaults options a for
> "mount -t cifs"?
> >
> > I would like to change the default protocol version to vers=2.1
> >
> > Is there something like a cifs.conf or such...?
>
> No, there isn't. You can add entries in your fstab file with
> share, mountpoints and options there but that has to be done
> for each share you plan to mount, probably not what you want.
>
> You could make a wrapper script around mount.cifs that would
> check or add the vers option. Something like this pseudo code:
>
>     if "vers" in $opts:
>         if val("vers", $opts) < 2.1:
>             err("min supported version is 2.1")
>     else:        
>         set("vers", $opts, 2.1)
>      
>     call mount.cifs $share $mnt -o $opts
>    
>
> --
> Aurélien Aptel / SUSE Labs Samba Team
> GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3 SUSE
> Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB
> 21284 (AG Nürnberg)
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba
>
>


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: define defaults for mount -t cifs

Samba - General mailing list
Hi Louis,

On 05/19/2017 12:10 PM, L.P.H. van Belle via samba wrote:

> Hai MJ,
>
> Have you tried:
>
> apt-get install cifs-utils if its not installed.
> man mount.cifs  ( if cifs-utils isnt installed no mount.cifs on debian.)
>
> And test with :
> mount.cifs //server/share /mnt/point -o vers=2.1
>
> Greetz,
>
> Louis

But that has nothing to do with my question, the mounts work, I just
want to make mount.cifs use vers=2.1 as a minimum.

Short background WHY::
I am using a piece of software called pydio that uses mount.cifs to
mount samba shares.
Adjusting the way pydio executes mount.cifs does not work, and all
mounts end up with the default vers=1.0

Sure: easiest would be to edit pydio config, but since that turns out to
be difficut, I thought I'd try to change the default vers of mount.cifs
to vers=2.1

MJ

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: define defaults for mount -t cifs

Samba - General mailing list
In reply to this post by Samba - General mailing list
Hi Aurélien,

On 05/19/2017 11:06 AM, Aurélien Aptel wrote:

> You could make a wrapper script around mount.cifs that would check or add
> the vers option. Something like this pseudo code:
>
>      if "vers" in $opts:
>          if val("vers", $opts) < 2.1:
>              err("min supported version is 2.1")
>      else:
>          set("vers", $opts, 2.1)
>      
>      call mount.cifs $share $mnt -o $opts

Interesting suggestion. Thank you!

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: define defaults for mount -t cifs

Samba - General mailing list
In reply to this post by Samba - General mailing list
On 19/05/17 12:03, mj via samba wrote:

> Hi Louis,
>
> On 05/19/2017 12:10 PM, L.P.H. van Belle via samba wrote:
>> Hai MJ,
>>
>> Have you tried:
>>
>> apt-get install cifs-utils if its not installed.
>> man mount.cifs  ( if cifs-utils isnt installed no mount.cifs on debian.)
>>
>> And test with :
>> mount.cifs //server/share /mnt/point -o vers=2.1
>>
>> Greetz,
>>
>> Louis
>
> But that has nothing to do with my question, the mounts work, I just
> want to make mount.cifs use vers=2.1 as a minimum.
>
> Short background WHY::
> I am using a piece of software called pydio that uses mount.cifs to
> mount samba shares.
> Adjusting the way pydio executes mount.cifs does not work, and all
> mounts end up with the default vers=1.0
>
> Sure: easiest would be to edit pydio config, but since that turns out to
> be difficut, I thought I'd try to change the default vers of mount.cifs
> to vers=2.1
>
> MJ
>
Try putting an entry in /etc/fstab.  You can set the options there, you
may want to add "noauto" and either "user" or "owner" (see fstab(5)).
Once the details are there all your application needs to do is issue a
mount command specifying either the share or the mount point.

Martin

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba