Jump to content

smb.conf不能使用导入含有%U的子配置文件


Recommended Posts

想针对用户区别显示共享目录。

按照网友的经验在smb.conf中添加:

include = /boot/config/samba/smb_%U.conf

PS:在设置--》SMB--》Samba 额外配置可以直接添加,不需要修改go文件。

无效,不能达到目的

已经测试如果使用完整路径比如:

include = /boot/config/samba/smb_abc.conf

可以正常导入并生效。

而且如果这样配置:

[Home_%U]
    path = /mnt/user/%U
    comment = 
    browseable = yes
    # Private
    writeable = no
    read list = 
    write list = %U
    valid users =  %U
    case sensitive = auto
    preserve case = yes
    short preserve case = yes
    vfs objects = catia fruit streams_xattr
    fruit:encoding = native
也是可以正确代入变量并生效。

但为什么用include直接导入带%U变量的路径就不可以?看到网上有说明include应该除%u , %P 和 %S以外都支持的。

 

Edited by lvxj11
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...