A simple smb.conf sample

You don't need much time on samba, just reference the following smb.conf.

But please remember some commands:

1) useradd username -s /sbin/nologin

2)smbpasswd -a username

3)chown and chmod

4)use "net use" and "smbclient" to test

[global]
workgroup = WORKGROUP
server string = %h server
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
username map = /etc/samba/smbusers
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
browsable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers

[share]
comment = Share for everyone
path = /home/samba/share
force user = nobody
force group = nogroup
read only = No
create mask = 0700
directory mask = 0700

[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S,marco
create mode = 0664
directory mode = 0775
Veto files = /*.exe/*.com/*.dll/*.bat/

[group]
comment = For group
path = /home/samba/rd
force user = nobody
force group = nogroup
public = no
valid users = @rd,marco
write list = @rd,marco
browseable = no
create mode = 0660
directory mode = 0770
Veto files = /*.exe/*.com/*.dll/*.bat/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值