Skip to content

Instantly share code, notes, and snippets.

@ilude
Last active February 9, 2020 14:03
Show Gist options
  • Select an option

  • Save ilude/e3b538e0df97f0ce78c92d1b5ba22355 to your computer and use it in GitHub Desktop.

Select an option

Save ilude/e3b538e0df97f0ce78c92d1b5ba22355 to your computer and use it in GitHub Desktop.
Setup Samaba on Ubuntu
sudo apt-get install -y samba samba-common-bin
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.orig
sudo tee -a ./smb.conf >/dev/null <<'EOF'
[global]
# 3 to debug
log level = 0
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = pathfinder-2
security = user
map to guest = bad user
dns proxy = no
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
[media]
path = /var/lib/media
browsable = yes
guest ok = yes
read only = yes
write list = mike
[apps]
path = /apps
guest ok = no
writable = yes
write list = mike
EOF
sudo mv ./smb.conf /etc/samba/smb.conf
sudo service smbd restart
smbpasswd -a $USER
sudo systemctl enable smbd.service nmbd.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment