hidden 07.04.2010 05:52
Есть вопрос! — Samba и testparm
Наваял индивидуальные конфиги для каждого юзера. В smb.conf добавил include = /etc/samba/smb.%U (в соответствующей папке накиданы эти самые конфиги, а-ля smb.vasya). В общем-то всё это даже работает. Но testparm утверждает, что "Can't find include file /etc/samba/smb." И в дампе тоже выводит, будто бы у меня include = /etc/samba/smb., без %U.Чего это он, а?
%U - session username (the username that the client wanted, not necessarily the same as the one they got).
%u - username of the current service, if any.
Я так понял, что всё же мне не имя сервиса требуется, а имя пользователя. Или есть какие-то неочевидные нюансы?
%u - username of the current service, if any.
Я так понял, что всё же мне не имя сервиса требуется, а имя пользователя. Или есть какие-то неочевидные нюансы?
Я так понял, что всё же мне не имя сервиса требуется, а имя пользователя. Или есть какие-то неочевидные нюансы?
rtfm - smb.conf
VARIABLE SUBSTITUTIONS
Many of the strings that are settable in the config file can take substitutions. For example the option “path = /tmp/%u” is interpreted as “path = /tmp/john” if the user connected with the username john.
Many of the strings that are settable in the config file can take substitutions. For example the option “path = /tmp/%u” is interpreted as “path = /tmp/john” if the user connected with the username john.
xT
Те строки, что я приводил, как раз из man-а по smb.conf.
Попробовал подставить %u, testparm выдал:
Can't find include file /etc/samba/smb.%u
И пользователи перестают получать шары, описанные в подключаемых файлах конфигурации, только общую для всех, которая в smb.conf назначена.
Так что, мой вариант всё-таки более рабочий. Понять бы ещё, почему, и в чём вообще разница между %u и %U.
rtfm - smb.conf
Те строки, что я приводил, как раз из man-а по smb.conf.
Попробовал подставить %u, testparm выдал:
Can't find include file /etc/samba/smb.%u
И пользователи перестают получать шары, описанные в подключаемых файлах конфигурации, только общую для всех, которая в smb.conf назначена.
Так что, мой вариант всё-таки более рабочий. Понять бы ещё, почему, и в чём вообще разница между %u и %U.
include (G)
пролетаем с таким инклюдом )
This allows you to include one config file inside another. The file is included literally, as though typed in place.
It takes the standard substitutions, except %u, %P and %S.
The parameter include = registry has a special meaning: It does not include a file named registry from the current working directory, but instead reads the global configuration options from the registry. See the section on registry-based configuration for details. Note that this option automatically activates registry shares.
Default: include =
Example: include = /usr/local/samba/lib/admin_smb.conf
It takes the standard substitutions, except %u, %P and %S.
The parameter include = registry has a special meaning: It does not include a file named registry from the current working directory, but instead reads the global configuration options from the registry. See the section on registry-based configuration for details. Note that this option automatically activates registry shares.
Default: include =
Example: include = /usr/local/samba/lib/admin_smb.conf
пролетаем с таким инклюдом )
надо - %u