postfix和samba

单体设计:sendmail
模块化设计:postfix

Postfix
  master --> master.cf

  smtpd, Daemon
  pickup
  cleanup
  qmgr, incoming, active, deferred
  smtp
  local
main.cf

$mydomain = a.com
$myhostname = mail.$mydomain

postconf -n 查看修改过的参数
postconf -d 默认

postconf -e "$mydomain = b.net"

vim /etc/postfix/main.cf
  myhostname = mail.bo.com
  mydomain = bo.com
  inet_interfaces = all
  mynetworks = 192.168.0.0/24


samba:

smb(Service message block)
cifs(common internet filesystem)

文件共享服务:smbd
名称解析服务:nmbd

smb/cifs
137,138,139,445

定义访问控制列表:
hosts_allow

/etc/samba/smb.conf

[global]

workgroup = WORKGROUP

server string = Samba Server Version %v

netbios name = smbserver

#hosts allow = 192.168.222.1,192.168.222.130

log file = /var/log/samba/log.%m

max log size = 50

passdb backend = tdbsam

security = share


[share]

comment = share

path = /opt/share

writeable = yes

security = user

valid users = @test

public = no


[pub]

comment = pub

path = /opt/pub

writeable = yes

public = yes

语法检查:testparm

/etc/init.d/smb

smbpasswd
 -a 增加
 -e 启用
 -d 禁用
 -x 删除

pdbedit

 -a 增加

 -x 删除

 -L 用户列表

 -Lv用户详细信息

setfacl -m u:terra:rwx /share/ 指定用户对目录有读写权限
getfacl /share/

chcon -t samba_share_t /share 修改标签
smbclient -L 192.168.0.60 -U terra%redhat 查看共享

mount -t cifs //192.168.0.60/tools /mnt -o username=terra,password=pwd 挂载

你可能感兴趣的:(samba,postfix,chcon,smbpasswd,setfacl)