1. 程式人生 > >SUSE11配置samba伺服器(實現Windows訪問Linux檔案系統)

SUSE11配置samba伺服器(實現Windows訪問Linux檔案系統)

1、配置suse11zypper源
進入存放repo的檔案目錄
cd /etc/zypp/repos.d
建立本地目錄
mkdir or
賦權
chmod 777 or
掛載介質
mount -o loop suse11_64.iso /or

檢視zypper源
zypper lr
刪除源
zypper rr
檢視所有安裝包
zypper se
配置本地zypper
zypper ar file:///.iso local-sles

2、安裝關於samba的包
zypper in samba


3、進入samba目錄
cd /etc/samba/

配置samba (此處為完全開放的不需要賬戶密碼就能訪問)
vi smb.conf 新增下列
[laiGei]
comment = Public stuff
path = /home/oracle/xxzx
public = yes
read only = No
browseable = yes
guest ok = yes

重啟smb服務
cpxyts01:/etc/samba # service smb restart

Windows:
//192.168.2.15
成功進入共享資料夾
配置開機自啟
cpxyts01:/etc/samba # chkconfig --level 35 smb on


需要賬戶密碼的配置
[u02]
comment = wardenking
path = /u02
security = user share為共享
writeable = yes
public = no 公共
read only = No 不只讀
browseable = yes 允許預覽
guest ok = no
hosts allow = 192.168.2.111 , 192.168.2.16 允許登入的ip

共享使用者需要先建立系統使用者
useradd smd
將系統使用者新增到共享使用者
smbpasswd -a smb
此時需要增加共享使用者的密碼
smbpasswd -d 凍結使用者
smbpasswd -e 恢復使用者
smbpasswd -n 將使用者密碼設定成空
smbpasswd -x 刪除使用者