Chinaunix首页 | 论坛 | 博客
  • 博客访问: 60995631
  • 博文数量: 173
  • 博客积分: 10400
  • 博客等级: 上将
  • 技术积分: 5973
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-03 22:08
文章分类

全部博文(173)

文章存档

2013年(2)

2012年(1)

2011年(17)

2010年(28)

2009年(76)

2008年(49)

分类: LINUX

2011-11-14 11:14:59


If you want to share files between your Ubuntu and Windows computers, your best option is to use Samba file sharing.

To install, first open a terminal window and enter the following command:

sudo apt-get install samba smbfs

We’ve got samba installed, but now we’ll need to configure it to make it accessible. Run the following command to open the configuration file, substituting your editor of choice:

sudo gedit /etc/samba/smb.conf

Find this section in the file:

####### Authentication #######

# “security = user” is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
;  security = user

Uncomment the security line, and add another line to make it look like this:

security = user
username map = /etc/samba/smbusers

This will set Samba to use the smbusers file for looking up the user list.

Create a Samba User

There are two steps to creating a user. First we’ll run the smbpasswd utility to create a samba password for the user.

sudo smbpasswd -a

Next, we’ll add that username to the smbusers file.

sudo gedit /etc/samba/smbusers

Add in the following line, substituting the username with the one you want to give access to. The format is  = “”.  You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.

= “

Now you can create samba shares and give access to the users that you listed here.


original link: 

阅读(771) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~