[Samba] copy of a share without path
Alexandre Klein
alexandre.klein at tanukisoftware.com
Mon Apr 25 09:35:18 UTC 2016
Thank you for your message.
I was not sure if the example (from here
https://www.samba.org/samba/docs/using_samba/ch06.html) was incorrect or
if I was missing something.
Alexandre Klein
Tanuki Software, Ltd.
6-18-10-4F Nishi-Kasai, Edogawa-ku
Tokyo 134-0088 Japan
Tel: +81-3-3878-3211
Fax: +81-3-3878-0313
http://www.tanukisoftware.com
On Mon, Apr 25, 2016 at 5:34 PM, Rowland penny <rpenny at samba.org> wrote:
> On 25/04/16 08:52, Alexandre Klein wrote:
>
>> Matthias,
>>
>> Sorry I should have wrote more details.
>> I agree with your message and I understand that template12 is not meant to
>> be a share.
>>
>> What I tried to say is:
>>
>> when I have this configuration:
>> [template12]
>> writable = yes
>> browsable = yes
>> valid users = alex
>>
>> [alex]
>> path = /home/alex
>> copy = template12
>>
>>
>> I can see this error in /var/log/samba/log/smbd
>> [2016/04/25 16:44:14.719192, 0]
>> ../lib/param/loadparm.c:966(lpcfg_service_ok)
>> WARNING: No path in service template12 - making it unavailable!
>>
>> And I'm unable to access "alex".
>>
>> But if I don't use "copy", then it works correctly:
>> [alex]
>> path = /home/alex
>> valid users = alex
>>
>>
>>
>>
>> Alexandre Klein
>> Tanuki Software, Ltd.
>> 6-18-10-4F Nishi-Kasai, Edogawa-ku
>> Tokyo 134-0088 Japan
>> Tel: +81-3-3878-3211
>> Fax: +81-3-3878-0313
>> http://www.tanukisoftware.com
>>
>> On Fri, Apr 22, 2016 at 5:10 PM, mathias dufresne <infractory at gmail.com>
>> wrote:
>>
>> How to use copy:
>>> [template12]
>>> writable = yes
>>> browsable = yes
>>> valid users = andy, dave, jay
>>> [share1]
>>> path=/path/to/share1
>>> copy = template12
>>> [share2]
>>> path=/path/to/share2
>>> copy = template12
>>>
>>> Here template12 is a template and it used later for declaring shares
>>> share1 and share2.
>>>
>>> template (or in my example template12) is not meant to be used as a share
>>> because a share is a directory you are sharing. A directory is
>>> represented
>>> by a path. So without path to the directory you want to share, Samba
>>> can't
>>> share anything because there is nothing to share...
>>>
>>>
>>> 2016-04-21 11:56 GMT+02:00 Alexandre Klein <
>>> alexandre.klein at tanukisoftware.com>:
>>>
>>> Hello,
>>>>
>>>> Is the example for 'copy' (
>>>> https://www.samba.org/samba/docs/using_samba/ch06.html ) valid?
>>>> [template]
>>>> writable = yes
>>>> browsable = yes
>>>> valid users = andy, dave, jay
>>>>
>>>> When I'm trying a similar configuration, I can't log in and I have this
>>>> message in log.smbd:
>>>> WARNING: No path in service template - making it unavailable!
>>>>
>>>> It seems I need to add a path:
>>>> [template]
>>>> writable = yes
>>>> browsable = yes
>>>> valid users = andy, dave, jay
>>>> path = /path/somewhere
>>>>
>>>> Or maybe there is something with the version of Samba that I'm using:
>>>> 2:4.1.6+dfsg-1ubuntu2.14.04.11
>>>>
>>>> Regards,
>>>> Alexandre Klein
>>>> --
>>>> To unsubscribe from this list go to the following URL and read the
>>>> instructions: https://lists.samba.org/mailman/options/samba
>>>>
>>>>
>>>
> OK, never used this, but 'man smb.conf' shows this:
>
> copy (S)
>
> This parameter allows you to "clone" service entries. The
> specified
> service is simply duplicated under the current service's name.
> Any
> parameters specified in the current section will override those
> in
> the section being copied.
>
> This feature lets you set up a 'template' service and create
> similar services easily. Note that the service being copied must
> occur earlier in the configuration file than the service doing
> the
> copying.
>
> Default: copy =
>
> Example: copy = otherservice
>
> Now, the relevant part (as far as I can tell) is this:
>
> This parameter allows you to "clone" service entries.
>
> To be a 'service' (aka share), it needs to have a path statement, which is
> probably why you are getting:
>
> WARNING: No path in service template12 - making it unavailable!
>
> Try adding a path to your template, perhaps 'path = /dev/null' , this will
> be over written by your later use of 'copy'
>
> Rowland
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
More information about the samba
mailing list