Ubuntu下配置samba實現文件夾共享

轉自:http://www.cnblogs.com/phinecos/archive/2009/06/06/1497717.htmlhtml

 

一. samba的安裝:windows

sudo apt-get insall samba
sudo apt-get install smbfs服務器

二. 建立共享目錄:session

mkdir /home/phinecos/share
sodu chmod 777 /home/phinecos/share測試

三. 建立Samba配置文件:rest

1. 保存現有的配置文件htm

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bakblog

2. 修改現配置文件ip

sudo gedit /etc/samba/smb.confget

在smb.conf最後添加

複製代碼

[share]
      path = /home/phinecos/share
      available = yes
      browsealbe = yes
      public = yes
      writable = yes

複製代碼

四. 建立samba賬戶

  sudo touch /etc/samba/smbpasswd
  sudo smbpasswd -a phinecos

而後會要求你輸入samba賬戶的密碼

 [若是沒有第四步,當你登陸時會提示 session setup failed: NT_STATUS_LOGON_FAILURE]

 五. 重啓samba服務器

sudo /etc/init.d/samba restart

六. 測試

smbclient -L //localhost/share

七,使用

能夠到windows下輸入ip使用了,在文件夾處輸入 "\\" + "Ubuntu機器的ip或主機名" + "\\" + "share"

 

標籤: Linux

相關文章
相關標籤/搜索