CentOS 7 samba server 配置,centossamba
samba是linux上的檔案分享權限設定服務軟體,相當與Windows上的共用資料夾,當然也是要在同一網段上的。
當前用的版本是4.4.4,好吧!下面介紹怎麼去安裝配置它,here we go!
1. 安裝:
[root@localhost ~]# yum install samba samba-client samba-common
2. 建立共用目錄:
[root@localhost ~]# mkdir /home/SMBShare/
[root@localhost SMBShare]# chmod -R 777 /home/SMBShare/
[root@localhost SMBShare]# chown -R smbtest:smbgrp /home/SMBShare/
[root@localhost SMBShare]# chcon -t samba_share_t /home/SMBShare/
3. 建立可訪問的使用者:
[root@localhost SMBShare]# groupadd smbgrp
[root@localhost SMBShare]# useradd -G smbgrp smbtest
[root@localhost SMBShare]# smbpasswd -a smbtest
New SMB password:
Retype new SMB password:
Added user smbtest.
4. 修改設定檔並儲存:
[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
security = user
map to guest = bad user
dns proxy = no
[mobile]
path = /home/SMBShare
valid users = @smbgrp
guest ok = no
writeable = yes
browsable = yes
5. 訪問測試:
在windows上輸入 \\centos,然後輸入帳號:smbtest 密碼:*********