搭建samba服務

2021-08-27 20:57:41 字數 3041 閱讀 3383

#samba 簡介#

yum -y install samba-*
mkdir -p /samba/test
[globol]

map to guest = bad user #設定匿名使用者

[test]

comment = test #共享目錄的注釋

path = /samba/test #共享目錄的路徑

browseable = yes #共享目錄可見

public = yes #允許匿名使用者訪問

writable = yes #允許使用者在目錄下寫

guset ok = yes #允許所有人訪問共享目錄

在伺服器上檢視建立的檔案和目錄,

username map = /etc/samba/smbusers #指定本地使用者對映成虛擬使用者的檔案存放位置

[user_test]

comment = user_test

path = /samba/user_test

browseable = yes

writable = yes

write list = hello #指定hello使用者進行讀寫訪問,不管這個共享是否是唯讀檔案

guest ok = yes

public = yes

testpram
service smb restart

service nmb restart

smbclient -l 172.16.12.129 -u tom
smbclient  -u tom

注:使用者名稱用對映使用者登入

**互動式登入訪問有問題,尚未解決,問題如下圖:

建立目錄進行檢視效果:

[root@localhost ~]# useradd test

[root@localhost ~]# smbpasswd -a test

new smb password:

retype new smb password:

added user test.

[user_test]

comment = user_test

path = /samba/user_test

browseable = yes

public = yes

# writable = yes

guest ok = yes

write list = hello

valid users = hello #允許hello使用者進行訪問,其他使用者不允許訪問(新增到配置檔案)

搭建samba服務

你知道什麼是天才的訣竅嗎?那就是永遠只做一件事。linux中samba伺服器的搭建 使用的vmware12虛擬機器安裝的centos6.8和物理機上的windows10,實現在windows10 上訪問centos上的samba服務。一 先檢視系統中是否安裝有samba服務相關的軟體包。samba ...

samba服務搭建

檔案傳輸 smb主配置檔案 etc samba smb.conf?yum install samba samba client 要啟動smb和nmb服務 修改安全級別 security share hosts allow 允許訪問的網段 192.168.1.comment?是共享目錄的描述 path...

samba服務搭建

類似於網盤的檔案儲存 安裝前準備 關閉防火牆 防火牆為iptables service iptables stop 臨時 or chkconfig iptables off 開機啟動時禁用 關閉selinux setenforce 0 or cd etc sysconfig selinux seli...