====== Samba ======
* http://www.samba.org/samba/docs/man/manpages-3/
* http://raerek.blogspot.hu/search/label/samba?max-results=10000
===== Gyorsítás =====
* https://www.arm-blog.com/samba-finetuning-for-better-transfer-speeds/
* https://forums.unraid.net/topic/97165-smb-performance-tuning/
===== smbpasswd =====
Password file: ''/var/lib/samba/passdb.tdb''
===== NTLMv2 =====
raw NTLMv2 auth = yes
[[https://www.samba.org/samba/security/CVE-2016-2111.html | CVE-2016-2111]]
===== Csomag aláírás =====
server signing = auto
client signing = auto
===== Változók ======
* http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html
* http://freebsdhowtos.com/49.html
//*The following substitutes apply only to some configuration options (only those that are used when a connection has been established)//
==== Client variables ====
^ Variable ^ * ^ Description |
^ ''%a'' | | The architecture of the remote machine. It currently recognizes Samba (Samba), the Linux CIFS file system (CIFSFS), OS/2, (OS2), Windows for Workgroups (WfWg), Windows 9x/ME (Win95), Windows NT (WinNT), Windows 2000 (Win2K), Windows XP (WinXP), Windows XP 64-bit(WinXP64), Windows 2003 including 2003R2 (Win2K3), and Windows Vista (Vista). Anything else will be known as UNKNOWN. |
^ ''%I'' | | the IP address of the client machine. |
^ ''%i'' | | the local IP address to which a client connected. |
^ ''%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. |
^ ''%M'' | | the Internet name of the client machine. |
==== User variables ====
^ Variable ^ * ^ Description |
^ ''%g'' | X | primary group name of ''%u''. |
^ ''%G'' | | primary group name of ''%U''. |
^ ''%H'' | X | the home directory of the user given by ''%u''. |
^ ''%u'' | X | username of the current service, if any. |
^ ''%U'' | | session username (the username that the client wanted, not necessarily the same as the one they got). |
^ ''%D'' | | name of the domain or workgroup of the current user. |
==== Share variables ====
^ Variable ^ * ^ Description |
^ ''%p'' | X | the path of the service's home directory, obtained from your NIS auto.map entry. The NIS ''auto.map'' entry is split up as ''%N:%p''. |
^ ''%P'' | X | the root directory of the current service, if any. |
^ ''%S'' | X | the name of the current service, if any. |
==== Server variables ====
^ Variable ^ * ^ Description |
^ ''%d'' | | the process id of the current server process. |
^ ''%h'' | | the Internet hostname that Samba is running on. |
^ ''%L'' | | the NetBIOS name of the server. This allows you to change your config based on what the client calls you. Your server can have a “dual personality”. |
^ ''%N'' | X | the name of your NIS home directory server. This is obtained from your NIS auto.map entry. If you have not compiled Samba with the ''--with-automount'' option, this value will be the same as ''%L''. |
^ ''%v'' | | Samba version |
==== Miscellaneous variables ====
^ Variable ^ * ^ Description |
^ ''%R'' | | the selected protocol level after protocol negotiation. It can be one of ''CORE'', ''COREPLUS'', ''LANMAN1'', ''LANMAN2'' or ''NT1''. |
^ ''%T'' | | the current date and time. |
^ ''%w'' | | the winbind separator. |
^ ''%$(envvar)'' | | the value of the environment variable envar. |
===== Hibakeresés =====
* https://access.redhat.com/solutions/450913
* https://wiki.samba.org/index.php/LinuxCIFS_troubleshooting#Enabling_Debugging
* Részletes mount hibák:
mount -t cifs --verbose ...
* Extra logok engedélyezése és megnézése:
echo 'module cifs +p' > /sys/kernel/debug/dynamic_debug/control
echo 'file fs/cifs/* +p' > /sys/kernel/debug/dynamic_debug/control
echo 7 > /proc/fs/cifs/cifsFYI
dmesg -Hw
* Aktív kapcsolatok részletei:
cat /proc/fs/cifs/DebugData
===== Multi-channel =====
* [[https://blog.chaospixel.com/linux/2016/09/samba-enable-smb-multichannel-support-on-linux.html]]
* [[https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#idm8992]]
* [[https://ubuntu.pkgs.org/22.04/ubuntu-main-amd64/samba_4.15.5~dfsg-0ubuntu5_amd64.deb.html]]
{{tag>cifs}}\\