This brief tutorial will outline how to enable file sharing in Ubuntu.這簡短的教程將概述如何啟用文件共享在Ubuntu的。
- Sharing files and folders across your network from your Ubuntu PC is every bit as easy as sharing files in Windows (arguably, it’s easier).共享文件和文件夾在您的網絡從您的Ubuntu的PC是每位一樣容易共享文件在Windows (可以說,它的更容易) 。 Start by right-clicking the folder you want to share, and select Share Folder .首先右鍵單擊要共享文件夾,並選擇共享文件夾 。 If the services required to share files/folders aren’t installed, you’ll be prompted to install them.如果所需的服務來共享文件/文件夾未安裝,系統會提示您安裝它們。
- After clicking Install services they will automatically start to download and install.點擊後安裝服務,他們會自動開始下載並安裝。
- Once that has completed you’ll be presented with an options window.一旦已完成您介紹一個選項窗口。 From here you can select the type of sharing (SMB or NFS), give the shared folder a name and decide if you want read-only access to the folder.從這裡你可以選擇的類型共享區( SMB或NFS ) ,讓共享文件夾的名稱,並決定如果你想只讀方式訪問該文件夾。 Click OK when you’re done.單擊確定時,您就大功告成了。
- If you right-click on your newly shared folder and select Properties and then the Emblems tab, you can give the folder a unique icon so you’ll know it’s shared.如果您按一下滑鼠右鍵,您的新的共享文件夾並選擇屬性,然後徽章標籤,您可以給文件夾中一個獨特的圖標,讓您知道它的共享。
- You can further modify the permissions of your shared folder by selecting the Permissions tab.你可以進一步修改的權限您的共享文件夾中選擇權限選項卡。
- Now open a terminal in Ubuntu and enter the command:現在打開一個終端在Ubuntu的,並輸入命令:
sudo smbpasswd -a username sudo的smbpasswd -用戶名
This will add a SMB user.這將添加一個中小型企業用戶。
- And now other computers can connect to your shared folder!和現在的其他電腦可以連接到您的共享文件夾!























{ 3 trackbacks } ( 3 trackbacks )
{ 31 comments… read them below or ( 月31日的評論…閱讀他們或低於 add one新增1 } )
And when it asks you for the username and password?而當它要求您為用戶名和密碼? Do you give the username and password of the linux account?你給的用戶名和密碼的Linux帳戶?
Ferdinand,費迪南德,
Yes - sorry I should have included that - will update shortly.是-抱歉,我應包括-將在短期內更新。
I have Ubuntu 7.04 running in Parallels Desktop.我有Ubuntu的7.04運行在平行的桌面上。 Will it possible to access a shared folder from Mac OS X running on the same machine.將有可能訪問一個共享文件夾,從在Mac OS X上運行的同一台機器上。 I tried it but it didn’t work.我曾嘗試,但它沒有工作。
I tried this, and cannot log in (from my windows machine) via my ubuntu username.我想這一點,無法登錄在(從我的Windows機器)通過我的Ubuntu的用戶名。 (which is “aamir”). (這是“阿米爾” ) 。 I can see the PC in “My Network Places”.我可以看到個人電腦在“網路上的芳鄰” 。
Please assist!請協助!
I tried the same approach as the one listed here but, under OS X (10.3.9), after I enter the Ubuntu admin username and password I get an error which says Can not connect as the username or password is incorrect.我嘗試同樣的做法,作為一個上市,但在這裡,根據OS X中( 10.3.9 ) ,當我進入Ubuntu的管理員用戶名和密碼,我得到一個錯誤說無法連接,作為使用者名稱或密碼是不正確。
I have attempted to connect from Ubuntu to the mac and that way works but not from the mac to Ubuntu.我曾試圖從Ubuntu的連接到Mac和這樣的工程,而不是從Mac到Ubuntu的。 Any ideas?任何想法?
To connect to your shared Linux folder on a Windows machine, enter sudo smbpasswd -a (username) in terminal and set your SMB password.連接到您的Linux的共享文件夾的Windows機器,輸入sudo的smbpasswd -一(用戶名)在碼頭,並設定您的SMB密碼。
Hi嗨
It seems that you also need to add a samba user :看來,您還需要添加一個Samba的用戶:
sudo smbpasswd -a usernamen sudo的smbpasswd - 1 usernamen
After that started to work with my installation之後開始工作與我的安裝
Please include that we also need to add the user as a samba user using the command into the main article… I thought I had done something wrong until I scrolled down to see the comments請附上,我們也需要添加的用戶作為一個Samba的用戶使用命令到主的文章… …我想我已做了一些錯誤,直到我被卷到見的評論
Thanks for the article.感謝文章。
Excellent support article here.良好的支持文章在這裡。 I have only been using Ubunta for couple of days and I love it.我只是一直在使用ubunta為在數天內,我喜歡它。 My feelings for Windows XP and Vista are moving more and more towards Ubunta.我的感受,為Windows XP和Vista的正越來越多地走向ubunta 。
Thank you for your help.感謝您的幫助。
Lee Farris李farris
yeah… another one that was stumped until the comments about adding the samba password…嗯…另一位是stumped ,直至評論加入Samba的密碼…
now it works great!現在工程的偉大!
Great article, although you’re missing half the equation.偉大的文章,雖然您失踪的一半方程。 You need to add a user as several people have mentioned before you’re tutorial can work.你需要添加一個用戶,因為幾個人有提過您可以補習社的工作。 (and a possible samba restart? - I just did it just in case) (和可能的桑巴重新啟動嗎-我只是沒有剛才的情況下)
sudo /etc/init.d/samba restart sudo來的/ etc / init.d /桑巴重新啟動
Peter - yeah I really do have to update this.黃匡源-是啊我真的要更新這個。 The samba user step I forgot as it had already been created.該桑巴用戶一步我忘了,因為它已經建立。 Thanks!謝謝!
And what should i do if i want Windows users to connect to my shared files without entering any password?和我應該怎麼做,如果我想Windows用戶連接到我的共享檔案,不需輸入任何密碼?
Thanks for the guide- I’ve been trying to work out if it is possible to share files in Ubuntu all morning and finally found this page.感謝指南-我一直在嘗試的工作,如果是有可能的共享文件在Ubuntu的所有上午終於找到了這一頁。
I right clicked on a file on this computer and installed both services, then chose SMB because NFS asked me about IP addresses, network name which I don’t know off hand.對不對點擊了一個文件在這台電腦上安裝了兩個服務項目,然後選擇中小企業,因為NFS的問我的IP地址,網絡名稱,我不知道小康的手。
My other computer asked me for a password for MSHOME but did not recognise my Ubuntu password.我的另一台電腦的問我,一個密碼mshome ,但沒有明白我的Ubuntu的密碼。
Tried sudo smbpasswd -a usernamen as above with no success.嘗試使用sudo smbpasswd - 1 usernamen如上沒有成功。
Then went through the same process on my other computer and found I could access the shared folder with no problem from this computer.接著,通過相同的過程對我的其他計算機,發現我可以訪問共享文件夾沒有問題,由這台電腦上。
I checked permissions/folder access on the shared folders on both computers and found one set to ‘access files’ and the other to ‘none’.我查了權限/文件夾訪問對共享文件夾兩台計算機上,發現一設置為'存取檔案'和其他'沒有' 。 (These were the default settings- don’t know why they were different.) (這些都是默認設置-不知道他們為什麼不同) 。
I was then able to see the shared folder on the other computer without being asked for a password.當時我能看到的共享文件夾的其他計算機沒有被要求輸入密碼。
Under what circumstances is it necessary to set up a samba password?在什麼情況下,是否有必要成立一個Samba的密碼?
I think file sharing in both directions is working now, even though I haven’t gone through the password process on this computer.我認為文件共享兩個方向的工作是現在,即使我沒有經過密碼的過程中在這台電腦上。
If possible could you include an idiots guide as to the relative merits of SMB and NFS (and indeed, what they are).可能的話,你能不能包括一白痴指導,以相對優點的SMB和NFS (事實上,他們所) 。
Is there any reason to use NFS when SMB seems to be far easier to set up?是否有任何理由要使用的NFS時,中小企業似乎要容易得多,成立呢?
Again, many thanks!再次,許多感謝!
While I should have known better, the ’smbpasswd’ step had me stumped.雖然我應該知道更好, ' smbpasswd '一步了我stumped 。 Thanks for the kick in the right direction.感謝揭幕,在正確的方向。
how do you connect to your shared folder ?你怎麼連接到您的共享文件夾呢?
How do you setup a shared folder that allows anonomous windows users.你怎麼設置一個共享文件夾,讓anonomous Windows用戶。 I would like to create an “In Box” folder and share it to my entire network so users can grab files from it or place files in it.我想建立一個“在框中”文件夾,並且將其分享我的整個網絡,使用戶可以搶到文件從它或地方的檔案。
In a network of hundreds of users putting a username and password for each user will not work.在一個網絡數以百計的用戶把用戶名和密碼,為每個用戶將是行不通的。
same here:同時在這裡:
sudo smbpasswd -a usernamen sudo的smbpasswd - 1 usernamen
fixed it for me, wasted a couple of hours today trying to get it working固定的,它對於我來說,浪費了幾個小時,今天試圖獲得工作
thanks!謝謝!
gosh, i went through the smbpasswd thingy too. gosh ,我經歷了smbpasswd thingy太。
and as a newbie, it took me 3 days befor i found this page… dang!作為一個新手,我花了3天前我發現這個網頁…黨!
thanks a ton, soup on Jun 12, 2007感謝1噸,湯對2007年6月12日
thanks a lot!感謝了很多! this worked for me!這個工作我!
when i try to let ubuntu install the services for the first time, i get no choice regarding the protocols.當我嘗試讓Ubuntu的安裝服務,為第一次,我別無選擇,得到關於議定書。 hardy just installs samba, but not nfs…what’s wrong here?哈剛剛安裝的Samba ,而不是NFS的… …什麼的錯誤在這裡出現?
I’m running two computers with Ubuntu and I tried all of this and I still don’t see anything when I go to Places–> Network.我運行兩台計算機與Ubuntu的和我曾嘗試所有這一切,我仍然沒有看到什麼,當我去的地方“ ->網絡。 Do I need to change settings on my router?我是否需要更改設置我的路由器?
Well hardy heron ubuntu I did most of the above including the smbpasswd stuff.以及哈蒼鷺Ubuntu的我本來大多數上述包括smbpasswd的東西。 The process was similar but not exact.過程是相似但不準確。 On my simple Xubuntu machine sharing right click sharing is not an option.就我簡單的xubuntu機共享的權利,單擊共享,是不是一種選擇。 On win98 net neighbourhood there is no singn of Ubuntu.對上Win98淨鄰里是沒有singn的Ubuntu的。 Any suggestions?任何建議? Ian伊恩
I get我得到
‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. '淨usershare '返回錯誤255 :淨usershare :無法打開usershare目錄的/ var / lib /桑巴/ usershares 。 Error Permission denied錯誤許可被拒絕
You do not have permission to create a usershare.您沒有權限創建一個usershare 。 Ask your administrator to grant you permissions to create a share.請問您的管理員授予您的權限創建一個共享。
When I try to share the folder.當我嘗試共享文件夾。
Thanks謝謝
I also get the error,我也得到錯誤,
“net usrshare returned error 255″ when I try to create a shared folder in ubuntu Hardy heron. “淨usrshare返回錯誤255 ”當我嘗試創建一個共享文件夾在Ubuntu的哈蒼鷺。
Thanks!!!感謝! I have one lonely *nix machine on a windows domain - I appreciated this.我有一個孤獨* nix中機上的Windows域-我讚賞這一點。
Something is missing from the instructions.事情是失踪的指示。 Here is what I get:這裡是我得到:
‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. '淨usershare '返回錯誤255 :淨usershare :無法打開usershare目錄的/ var / lib /桑巴/ usershares 。 Error Permission denied錯誤許可被拒絕
You do not have permission to create a usershare.您沒有權限創建一個usershare 。 Ask your administrator to grant you permissions to create a share.請問您的管理員授予您的權限創建一個共享。
I am also installing on hardy and running into this problem:我也安裝在Hardy和運行到這個問題:
‘net usershare’ returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. '淨usershare '返回錯誤255 :淨usershare :無法打開usershare目錄的/ var / lib /桑巴/ usershares 。 Error Permission denied錯誤許可被拒絕
You do not have permission to create a usershare.您沒有權限創建一個usershare 。 Ask your administrator to grant you permissions to create a share.請問您的管理員授予您的權限創建一個共享。
any ideas there?有任何意見?
ok here is the hardy fix:確定這裡是哈定:
I selected to install samba (file server) when i installed hardy server edition-this is ok. i選定要安裝的Samba (文件服務器) ,當我安裝的Hardy服務器版-這是確定。
when i got the desktop installed i tried to right click in nautilus (file explorer) and share the file and I got the previous error (net usershare 255).當我在桌面上安裝我嘗試按一下滑鼠右鍵,在鸚鵡螺(檔案總管)和共享文件和我得到了以前的錯誤(淨usershare 255 ) 。
to fix it i went to system ->administration -> users and groups.要修復它,我到系統-> “行政- >”用戶和組。 then unlock (enter password) then manage groups.然後解鎖(輸入密碼) ,那麼管理組。 choose sambashare then properties. sambashare ,然後選擇屬性。 select your name hit ok, close, close.選擇您的姓名擊中確定,關閉,關閉。
Then logout and log back in and then right click and try to share the directory.然後註銷並重新登錄在然後按一下滑鼠右鍵,並嘗試分享的目錄。
For some reason in hardy samba doesn’t add you to the sambashare group.出於某種原因,在哈的Samba並不您添加到sambashare組。
I didn’t do any of that sambashare stuff!我沒有做任何表示, sambashare東西! I just followed what Brad said and it worked for me.我只是其次是什麼布拉德說,它的工作對我來說。
“to fix it i went to system ->administration -> users and groups. “要解決它,我到系統-> ”行政- >“用戶和組。 then unlock (enter password) then manage groups.然後解鎖(輸入密碼) ,那麼管理組。 choose sambashare then properties. sambashare ,然後選擇屬性。 select your name hit ok, close, close.選擇您的姓名擊中確定,關閉,關閉。
Then logout and log back in and then right click and try to share the directory.然後註銷並重新登錄在然後按一下滑鼠右鍵,並嘗試分享的目錄。 ” “
Thanks for the help.感謝您的幫助。 When I tried the first fix in the command line thing, it always said cannot modify password, so I gave up and tried Brad’s sollution, and voila, it worked!當我嘗試第一次修正在命令行事,總是說不能修改密碼,所以我放棄了,並試圖Brad的sollution , voila ,它的工作!
Great howto THX偉大如何thx
Leave a Comment留下意見