CentOS 7 samba server 配置,centossamba

來源:互聯網
上載者:User

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 密碼:*********

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.