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留下意见