User Tools

Site Tools


linux:samba

Redhat Install

yum install samba samba-client samba-common

Enable startup

systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service

smb.conf

[global]
workgroup = WINDOWS
server string = Samba Server Version %v
netbios name = SAMBA
max protocol = SMB2
log level = 1
log file = /var/log/samba/log.%m
max log size = 50
security = user
local master = no
os level = 33
preferred master = no
wins support = no
wins server = 172.24.16.254
wins proxy = yes
dns proxy = yes
map to guest = bad user

username map = /etc/samba/smbusers

use sendfile = 1
deadtime = 10
allocation roundup size = 10485760

load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes

#====== Share Definitions
[public]
comment = Public
path = /storage/public
public = yes
writable = yes
printable = no
guest ok = yes

Add users

smbpasswd -a <linuxuser>

Samba users mapping to Linux

/etc/samba/smbusers

linuxuser = sambaname

Mount SAMBA device

/etc/fstab

//172.24.16.20/backup_oracle /backup_oracle cifs _netdev,rw,username=USER,passwd=PASSWORD,file_mode=0640,dir_mode=0750,uid=oracle,gid=oinstall 0 0
linux/samba.txt · Last modified: 2017/10/31 15:40 by Jan Forman