`
ggsonic
  • 浏览: 258679 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Install Samba Server on Ubuntu

阅读更多
http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/


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 <username>

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 <ubuntuusername> = “<samba username>”.  You can use a different samba user name to map to an ubuntu account, but that’s not really necessary right now.

<username> = “<username>”

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



ps : you should check the "selinux" config , or there maybe "tree connect failed: NT_STATUS_BAD_NETWORK_NAME" error


from: http://hi.baidu.com/51cmdshell/blog/item/ee1114ae43b014c77cd92ac6.html

Ubuntu Samba服务安装与配置
2010年02月17日 星期三 12:14

一. Ubuntu samba配置的安装:

sudo apt-get install samba smbfs smbclient

二. 创建共享目录:

mkdir /home/komy/share
sodu chmod 777 /home/komy/share

三. 创建Ubuntu Samba配置文件:

1. 保存现有的配置文件
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
2. 修改现配置文件
sudo gedit /etc/samba/smb.conf
在smb.conf最后添加
[share]
path = /home/komy/share
available = yes
browsealbe = yes
public = yes
writable = yes

其实,更为简单的是在ubuntu下右击文件夹属性,在共享里设置共享,但实质上系统更改了smb.conf文件.

四. 创建Ubuntu samba帐户

sudo touch /etc/samba/smbpasswd
sudo smbpasswd -a komy              #komy必须为系统中存在的账户

然后会要求你输入samba帐户的密码

如果没有第四步,当你登录时会提示 session setup failed: NT_STATUS_LOGON_FAILURE]

五. 重启Ubuntu samba服务器

sudo /etc/init.d/smbd restart

六. Ubuntu Samba配置测试

smbclient //localhost/share

七,Ubuntu Samba配置使用

可以到windows下输入ip使用了,在文件夹处输入 "\\" + "Ubuntu机器的ip或主机名" + "\\" + "share"
分享到:
评论

相关推荐

    ubuntu搭建samba环境

    文档描述了如何在虚拟机环境下ubuntu搭建samba环境的过程。方便初学者快速搭建,按照文档的介绍,你就可以在你的ubuntu中搭建你的samba共享环境,实现windows与linux资源共享

    避坑指南之完整版Samba4在Ubuntu 20.0.4安装指南

    完整的解决Samba4在Ubuntu 20.0.4安装使用

    samba windows linux ubuntu 共享

    samba windows linux ubuntu 共享

    installing samba on ubuntu

    面是我在Ubuntu6.06 LTS 下源码编译安装samba主要安装过程,本人第一次用Ubuntu,刚装上去时候,没有gcc编译环境。郁闷了半天。找出这一过程发了不少的时间。可能还有些不妥,不过我经过这样的安装达到了向windows共享...

    ubuntu下安装samba服务器

    ubuntu中通过安装samba服务器,实现在windows系统通过网络驱动器访问ubuntu系统

    Ubuntu下samba的使用

    Ubuntu下samba的使用 1. 安装samba服务器 2. 共享Ubuntu下的文件夹 (1) 手动配置方法 1) 打开/etc/samba/smb.conf。注:打开之前最好先备份一下 2) 在末尾添加如下配置项,假设需共享/home/flyfish/7800文件夹 ...

    ubuntu20.04无网安装samba

    ubuntu20.04无网安装samba 自我安装成功,如有缺依赖,可能还需要再下载其他的依赖包

    ubuntu安装配置samba

    ubuntu安装配置samba sudo apt-get install samba sudo apt-get install smbfs 下面我们来共享群组可读写文件夹,假设你要共享的文件夹为: /home/ray/share 首先创建这个文件夹

    ubuntu12.04 samba配置文件

    配置ubuntu12.04 samba服务器的话,把必要的软件安装之后,还需要修改配置文件,可以先把系统的配置文件备份,这个拷贝过去替换系统的文件,把名字了。次配置文件本人一验证,可以使用,配置文件的最后12行是我自己...

    ubuntu samba服务器多用户配置

    ubuntu samba服务器多用户配置,在/home/下有多个用户目录A、B...,现通过samba共享,要求A用户对A用户组目录具有root权限,对其他目录具有读权限,B用户对B目录具有root权限,对其他目录只读。并在登陆各个目录时...

    ubuntu samba的安装,samba连接不上

    ubuntu samba的安装,samba连接不上

    ubuntu下samba源码

    samba是一个工具套件,在Unix上实现SMB(Server Message Block)协议,或者称之为NETBIOS/LanManager协议。SMB协议通常是被windows系列用来实现磁盘和打印机共享。需要注意的是,NetBIOS是基于以太网广播机制的,没有...

    Virtualbox下Ubuntu Samba配置

    Virtualbox下Ubuntu Samba配置

    使用PAM同步Samba与系统用户密码

    ubuntu的samba可是使windows直接通过文件夹的形式访问ubuntu内的文件,方便快捷,并且通过使用PAM同步samba与系统用户密码后,用户可以直接使用ubuntu的账号访问samba,从而减少管理samba单独的账号密码。

    在ubuntu中部署samba服务器的方法

    Samba服务在Ubuntu服务器版本中默认并没有安装。今天公司上了一批新电脑,准备把它装成服务器,于是为了方便开发的使用,我在上面部署了一个samba,用来实现window和linux的联系: 具体步骤,我详细的查看了百度,高手...

    linux samba server 3.6.9安装包

    liunx samba-3.6.9-151.el6.x86_64.rpm 安装包

    ubuntu下如何搭建samba

    ubuntu下如何搭建samba,虚拟机搭建samba实现与windows的互联。

    使用samba实现Ubuntu 11和win7文件共享

    使用samba实现Ubuntu 11和win7文件共享 一步一步的操作

    Ubuntu 设置Samba服务器

    Ubuntu下Samba服务器完全配置攻略 系统平台:VMware Workstaition 6.5 +Ubuntu 11.04

    ubuntu samba服务器建立教程

    描述了在ubuntu10.04上安装samba服务器的步骤,在ubuntu12.04上测试过,也可安装。

Global site tag (gtag.js) - Google Analytics