Defina o nome do host como uma variável no arquivo smb.conf

0

Eu quero inserir uma variável que represente "nome do netbios" no arquivo smb.conf. Eu posso definir "home dir" como uma variável com o uso de% U, o que posso usar para fazer a mesma coisa para "nome netbios"?

    
por Gefolge 27.04.2018 / 16:03

1 resposta

1

Se você digitar man 5 smb.conf , verá uma lista completa de variáveis que podem ser substituídas, incluindo %m : -

%m the NetBIOS name of the client machine (very useful).

This parameter is not available when Samba listens on port 445, as clients no
longer send this information. If you use this macro in an include statement on a
domain that has a Samba domain controller be sure to set in the [global] section
smb ports = 139. This will cause Samba to not listen on port 445 and will permit
include functionality to function as it did with Samba 2.x.

Outra substituição útil é $(envvar) , que permite usar qualquer variável de ambiente exportada na configuração.

    
por 27.04.2018 / 16:36

Tags