Raspberry Pi
About 1 minraspberry pi samba setup
Getting Samba to work
Why?
This helps to mount and develop on raspberry pi directly. Can be super convenient when developing on the pi
How?
- Let's make sure we got the correct smb.conf
- Let's disable
nmbd
Edit smb.conf file
Samba configuration file. It all starts here. Working version below
sudo vi /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
log level = 0
logging = file
map to guest = bad user
max log size = 1000
netbios name = dobermann
server string = dobermann
obey pam restrictions = Yes
local master = no
preferred master = no
domain master = no
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd program = /usr/bin/passwd %u
server min protocol = SMB2
server role = standalone server
unix password sync = Yes
fruit:delete_empty_adfiles = yes
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:veto_appledouble = no
fruit:posix_rename = yes
fruit:model = RackMac
fruit:metadata = stream
idmap config * : backend = tdb
vfs objects = catia fruit streams_xattr
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
[homes]
comment = Home Directory
browsable = no
Disable NMBD (NetBIOS Message Block Daemon)
This is the one that advertises NETBIOS addresses and keeps other servers logging the below message.
[2020/12/30 20:59:11.257461, 0] ../source3/nmbd/nmbd_namequery.c:109(query_name_response)
query_name_response: Multiple (2) responses received for a query on subnet 192.168.100.166 for name WORKGROUP<1d>.
This response was from IP 192.168.100.143, reporting an IP address of 192.168.100.143.
This can keep the NAS devices (wdmycloud) up unnecssarily
To stop loading nmbd during raspberry pi
startup run the below command
sudo update-rc.d nmbd disable
Write samba logs to RAM
Unless you are debugging or developing samba protocol, these logs are more or less useless
Let's save the sd card from samba making un-necessary log writes
Make sure in the /etc/samba/smb.conf file, log level is set to zero
log level = 0