Geody Labs


# Main Index: Debian Linux Magic Spells Cheat Sheet (one liners, how to, tips and tricks)

# Samba

Samba is a free, cross-platform implementation of the Microsoft SMB (Server Message Block) protocol for sharing files, printers, and other devices over a network.

apt-get install samba smbfs smbclient samba-doc

mkdir /public
mkdir /public/shared
chmod -v 0777 /public
chmod -v 0777 /public/shared

jed /etc/samba/smb.conf

---

# samba configuration file

[global]
allow hosts = 192.168.0.0/255.255.255.0
workgroup = network
server string = %h server (Samba %v)
log file = /var/log/samba/log.%m
max log size = 1024

; security = user
encrypt passwords = true
passdb backend = tdbsam guest
guest account = nobody
invaluid users = root

preserve case = yes
short preserve case = yes

; include /home/samba/etc/smb.conf.%m
socket options = TCP_NODELAY

[homes]
comment = Home directories
browseable = no
writable = no
create mask = 0700
directory mask = 0700

[shared]
comment = Public shared directory
path = /public/shared
public = yes
browseable = yes
; read only = no
writable = yes
; printable = no
create mask = 0766
directory mask = 0766
guest ok = yes
; valid users = user_name

---

testparm /etc/samba/smb.conf

/etc/init.d/samba restart

smbpasswd -a nobody
New SMB password:
Retype new SMB password:

log file (default):
/var/log/samba/log.%m

smbtree # find Windows machines




Please DONATE to support the development of Free and Open Source Software (PayPal, Credit Card, Bitcoin, Ether)

Page issued on 25-Sep-2022 03:59 GMT
Copyright (c) 2022 Geody - Legal notices: copyright, privacy policy, disclaimer