歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux下的Windows share 訪問

Linux下的Windows share 訪問

日期:2017/2/28 17:14:37   编辑:Linux教程

Linux 手動掛在windows共享
smbclient //ip/dir -U user
sudo mount "//ip/dir" /mnt/dir
smbmount //ip/dir /mnt/dir使用smbclient -L //分享主機名或地址,查看共享電腦的資源

Linux 下自動掛在windows 共享 創建登錄需要的用戶名和密碼
在root目錄下創建一隱藏文件.smbcredentials
添加如下的content
content username= “yourname” password = “password”
修改其 property 為 700
Chmod 700 smbcredentials

addition this line to /etc/fstab
//windowspc's ip/sharedir /mnt/directory smbfs credentitals=/root/.sbmcredentials 0 0

that's all.

Copyright © Linux教程網 All Rights Reserved