一. samba的安裝: windows
sudo apt-get insall samba
sudo apt-get install smbfs
二. 建立共享目錄: 服務器
mkdir
/
home
/
phinecos
/
share
sodu chmod
777
/
home
/
phinecos
/
share
三. 建立Samba配置文件: session
1. 保存現有的配置文件 測試
sudo cp
/
etc
/
samba
/
smb.conf
/
etc
/
samba
/
smb.conf.bak
2. 修改現配置文件 spa
sudo gedit
/
etc
/
samba
/
smb.conf
在smb.conf最後添加 rest
[share]
path
=
/
home
/
phinecos
/
share
available
=
yes
browsealbe
=
yes
public
=
yes
writable
=
yes
四. 建立samba賬戶 ip
sudo touch
/
etc
/
samba
/
smbpasswd
sudo smbpasswd
-
a phinecos
而後會要求你輸入samba賬戶的密碼 get
[若是沒有第四步,當你登陸時會提示 session setup failed: NT_STATUS_LOGON_FAILURE] it
五. 重啓samba服務器 io
sudo
/
etc
/
init.d
/
samba restart
六. 測試
smbclient
-
L
//
localhost/share
七,使用
能夠到windows下輸入ip使用了,在文件夾處輸入
"
\\
"
+
"
Ubuntu機器的ip或主機名
"
+
"
\\
"
+
"
share
"