samba的安装和配置

SAMBA的安装

安装环境:cendos7.5

1:安装应用

yum -y install samba samba-client

2:创建共有文件夹

mkdir /home/R
mkdir /home/S
mkdir /home/N
mkdir /home/J

3:给共有文件夹设置权限

sudo chmod 777 /home/R
sudo chmod 777 /home/S
sudo chmod 777 /home/N
sudo chmod 777 /home/J

4:将配置文件备份一下

cp smb.conf smp.conf~bak

5:修改配置文件

[root@localhost samba]# vi smb.conf

 

# See smb.conf.example for a more detailed config file or				
# read the smb.conf manpage.				
# Run 'testparm' to verify the config is correct after				
# you modified it.				
				
[global]				
        workgroup = SAMBA				
        security = user				
				
        passdb backend = tdbsam				
        map to guest = Bad User				
				
        printing = cups				
        printcap name = cups				
        load printers = yes				
        cups options = raw				
				
        hosts allow =10.167				
				
[homes]				
        comment = Home Directories				
        valid users = %S, %D%w%S				
        browseable = No				
        writable = yes				
        path = /home/J				
        read only = No				
        inherit acls = Yes				
				
[printers]				
        comment = All Printers				
        path = /var/tmp				
        printable = Yes				
        create mask = 0600				
        browseable = No				
				
[print$]				
        comment = Printer Drivers				
        path = /var/lib/samba/drivers				
        write list = @printadmin root				
        force group = @printadmin				
        create mask = 0664				
        directory mask = 0775				
				
				
[J]				
    path = /home/J				
    writable = yes				
    guest ok = yes				
    guest only = yes				
    create mode = 0777				
    directory mode = 0777				
				
[N]				
    path = /home/N				
    writable = yes				
    guest ok = yes				
    guest only = yes				
    create mode = 0777				
    directory mode = 0777				
				
[S]				
    path = /home/S				
    writable = yes				
    guest ok = yes				
    guest only = yes				
    create mode = 0777				
    directory mode = 0777				
				
[R]				
    path = /home/R				
    writable = yes				
    guest ok = yes				
    guest only = yes				
    create mode = 0777				
    directory mode = 0777				

6:重启服务

systemctl start smb nmb

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值