Skip to content

Instantly share code, notes, and snippets.

@jftuga
Last active January 1, 2023 15:34
Show Gist options
  • Save jftuga/8046ad3119d24690f5db2eb8992dfa4f to your computer and use it in GitHub Desktop.
Save jftuga/8046ad3119d24690f5db2eb8992dfa4f to your computer and use it in GitHub Desktop.
Install Samba on Raspberry Pi

Fedora 36

initial setup

dnf install -y samba
systemctl enable smb
systemctl enable nmb
systemctl start nmb
systemctl start smb
setsebool -P samba_enable_home_dirs=1
firewall-cmd --add-service=samba --permanent
firewall-cmd --reload
# (may need to reboot)

Raspberry Pi OS

initial setup

apt install -y samba samba-common-bin
systemctl enable smbd
systemctl enable nmbd
add user jftuga
smbpasswd -a jftuga

smb.conf

  • /etc/samba/smb.conf
  • see other file

start services

systemctl start nmbd
systemctl start smbd

client

  • net use j: \\1.2.3.4\jftuga /persistent:yes
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
usershare allow guests = no
[homes]
comment = Home Directories
browseable = no
read only = no
create mask = 0700
directory mask = 0700
valid users = %S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment