ตั้งชื่อโฮสต์เป็นตัวแปรในไฟล์ smb.conf


0

ฉันต้องการป้อนตัวแปรที่แสดง "netbios name" ในไฟล์ smb.conf ฉันสามารถตั้งค่า "home dir" เป็นตัวแปรที่มีการใช้% U ฉันจะใช้อะไรทำสิ่งเดียวกันกับ "ชื่อ netbios"?

คำตอบ:


2

หากคุณพิมพ์man 5 smb.confคุณจะเห็นรายการตัวแปรทั้งหมดที่สามารถทดแทนได้ซึ่งรวมถึง%m: -

% m ชื่อ NetBIOS ของเครื่องไคลเอนต์ (มีประโยชน์มาก)

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.

การทดแทนอื่นที่มีประโยชน์คือ$(envvar)ให้คุณใช้ตัวแปรสภาพแวดล้อมที่ส่งออกใด ๆ ในการกำหนดค่า

โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.