安装 SAMBA组件yum install samba
修改/etc/smb.conf
[global]workgroup = WORKGROUP
server string = Samba Server Version1 %v
netbios name = WANGZISERVER
unix charset = utf8
display charset = utf8
dos charset = cp36
hosts allow = 127. 192.168.0. 10.0.0.
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = smbpasswd:/etc/samba/smbpasswd
load printers = no
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
create mode = 0664
directory mode = 0775
[project]
comment = smbuser's project
path = /home/project
browseable = yes
writable = yes
write list = @users
[技术部]
comment =信息技术
path = /home/jishu
writeable = yes
browseable = yes
write list = @ftp
security = user
passdb backend = smbpasswd:/etc/samba/smbpasswd
load printers = no
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
create mode = 0664
directory mode = 0775
[project]
comment = smbuser's project
path = /home/project
browseable = yes
writable = yes
write list = @users
[技术部]
comment =信息技术
path = /home/jishu
writeable = yes
browseable = yes
write list = @ftp
创建文件夹:
#mkdir /home/jishu
#mkdir /home/project
#chgrp users /home/project
#chgrp ftp /home/jishu
#useradd -G ftp wangzi
#useradd -G users gongxiang
#echo wangzi | passwd --stdin wangzi
#echo 123 | passwd --stdin gongxiang
#pdbedit -a -u wangzi
#pdbedit -a -u gongxiang
查询目前已经存在的samba账号:
#pdbedit -L