Main configuration
- Location
/etc/samba/smb.conf - = INI-file
Enterprise Linux
HOGENT applied computer science
Set up the test environment
$ cd elnx-syllabus/demo
$ vagrant up fs
[...]
A working VM this time!
Samba as AD DC is not discussed here
sudo dnf install samba samba-client
sudo systemctl enable --now nmb
sudo systemctl enable --now smb
sudo firewall-cmd --add-service samba
nmbd: NetBIOS name server
\\server\sharesmbd
Check with ss!
| Service | Port |
|---|---|
| NetBIOS | 137/udp |
| 138/udp | |
| SMB | 139/tcp |
| 445/tcp |
/etc/samba/smb.conf/var/lib/samba/private/passdb.tdb[global]
netbios name = files
workgroup = AVALON
server string = "Avalon, Inc. file server"
wins support = yes
local master = yes
domain master = yes
preferred master = yesTest with
nmblookup -U 192.168.56.12 filesnmblookup filesManaging (r/w) access to shares is hard!
2 groups, 2 users in each group:
| User | Group |
|---|---|
| sparrow | pirates |
| teach | pirates |
| fuma | ninjas |
| hattori | ninjas |
Password = username
# tree /srv/shares/
/srv/shares/
├── cove
│ └── everyone.txt
├── dojo
│ └── ninjas.txt
└── everyone
└── pirates.txt
smbclient -L //server/smbclient //server/share -Ualice%letmeinsmbclient //server/share -U%| Setting | Purpose |
|---|---|
| browseable | share is visible |
| valid users | read access |
| read only/writeable | write access |
samba_share_tpublic_content_tjournalctl -u nmb.servicejournalctl -u smb.servicetail -f /var/log/audit/audit.logtestparm -ssmbclient instead of Windows file manager