一、准备工作

  首先更新 software sources, 找到最快的源

lcw@ubuntu:~$ sudo apt-get update

二、安装samba

lcw@ubuntu:~$ sudo apt-get install samba smbfs samba-common smbclient

三、创建samba配置文件

1. 保存现有的配置文件

lcw@ubuntu:~$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

2. 编辑配置文件

lcw@ubuntu:~$ sudo vim /etc/samba//smb.conf

  在smb.conf最后添加

[username] 

path=/home/username 

available=yes 

browseable=yes 

public=yes 

writable =yes 

  (注意: 上面的设置中,username 换成你的用户名, 如果在前面有“#”,需要先把它去掉,path必须是已经创建的路径)

四、创建samba帐户

lcw@ubuntu:~$ sudo smbpasswd -a lcw

  Lcw换成自己的用户名

  这里会要求你输入samba帐户的密码

lcw@ubuntu:~$ sudo smbpasswd -a lcw

New SMB password:

Retype new SMB password:

Added user lcw.

lcw@ubuntu:~$ 

五、重启samba服务器

lcw@ubuntu:~$ sudo /etc/init.d/smbd reload

Rather than invoking init scripts through /etc/init.d, use the service()

utility, e.g. service smbd reload

Since the script you are attempting to invoke has been converted to an

Upstart job, you may also use the reload() utility, e.g. reload smbd

lcw@ubuntu:~$ 

  修改过smb.conf 的话要执行一次

lcw@ubuntu:~$ sudo /etc/init.d/smbd restart

Rather than invoking init scripts through /etc/init.d, use the service()

utility, e.g. service smbd restart

Since the script you are attempting to invoke has been converted to an

Upstart job, you may also use the stop() and then start() utilities,

e.g. stop smbd ; start smbd. The restart() utility is also available.

smbd stop/waiting

smbd start/running, process 

lcw@ubuntu:~$ 

六、测试

  到windows下输入ubuntu ip试一下

  在“我的电脑”或者在“运行”处输入“\\+ubuntu机器的ip”即可

【教程】ubuntu下安装samba服务器的更多相关文章

  1. Ubuntu下安装Samba服务器

    闲来无聊尝试自己安装下Samba服务器,使本机和虚拟机可以无障碍传输文件(虽然用VMwaretools可传,但总感觉麻烦,而且速度欠佳) 首先,同安装qemu一样,在安装之前要确定你的系统apt列表已 ...

  2. Ubuntu上安装Samba服务器实现家庭共享

    如何在Ubuntu上安装Samba服务器 大多数Linux发行版都包含Samba. 要在Ubuntu上安装Samba,只需运行: sudo apt install samba 要检查您的Samba版本 ...

  3. 【转】Ubuntu下配置samba服务器--不错

    原文网址:http://my.oschina.net/junn/blog/171388 设置虚拟机的网络方式为桥接方式: 一. samba的安装: sudo apt-get insall samba  ...

  4. 共享文件 Ubuntu下安装Samba与Windows

    Author:Xianghai Ding.Date:2019/01/08**************************************************************安装 ...

  5. Ubuntu下配置Samba服务器

    每次配置Samba 都需要上网去查资料,而且有一些不一定适合.所以自己就简单记录一下 1.Samba的安装 sudo apt-get insall samba // (sudo get temp ro ...

  6. ubuntu下搭建samba服务器

    samba是用于linux和windows下文件共享的协议 首先,更新源并安装samba sudo apt-get update sudo apt-get install samba 然后创建一个共享 ...

  7. Ubuntu下配置samba服务器实现文件共享

    安装Samba 安装samba sudo apt-get install samba Kubuntu 安装系统设置的共享模块 sudo apt-get install kdenetwork-files ...

  8. centos7下安装samba服务器

    samba笔记: http://services.linuxpanda.tech/%E7%BD%91%E7%BB%9C%E6%96%87%E4%BB%B6%E5%85%B1%E4%BA%AB/samb ...

  9. centos6.5下安装samba服务器与配置

    转自:http://www.centoscn.com/CentosServer/ftp/2014/1023/3989.html http://www.cnblogs.com/x_wukong/p/56 ...

随机推荐

  1. 【mysql】一条慢查询sql的的分析

    这个是我在jobbole.com 上看到的 先给出数据表table结构 mysql> show create table tt \G *************************** 1. ...

  2. AWVS扫描工具使用教程

    上文AppScan扫描工具-工作原理&操作教程有写到Web安全漏洞扫描工具之一的APPScan,除此,还有另外一款国内使用比较主流的Web安全漏洞扫描工具——AWVS.相较于大容量的AppSc ...

  3. MATLAB 设置文件的相对路径

    加载文件使用命令:load(' 文件名 or 文件路径 ') 1.文件在当前路径下: 直接  load('session.mat') 2.文件在下一级路径下: 使用  load (' .\下一级路径的 ...

  4. vim recording功能介绍

    使用vim时无意间触碰到q键,左下角出现“recording”这个标识,觉得好奇,遂在网上查了一下,然后这是vim的一个强大功能.他可以录制一个宏(Macro),在开始记录后,会记录你所有的键盘输入, ...

  5. 用UltraEdit判断打开文件的编码类型 用UltraEdit或notepad记事本查看文件编码格式 用UltraEdit查看当前文件编码

    用UltraEdit查看当前文件编码 想判断文件的编码类型? 用强大的UltraEdit-32软件: UltraEdit-32的状态栏可以显示文件的编码类型,详细情况如下: ANSI/ANSCI--- ...

  6. k8s之Service

    一.概述 在k8s中暴露Service访问(无论内部还是外部),都要经过kube-proxy: 如下图:

  7. Sails入门指南

    1.全局观:sails理念,框架结构 2.试用sails的scaffolding工具,创建model,创建controller, 3.启动server,试用blueprint, 4.进阶: 4.0 数 ...

  8. linux中chkconfig 启动程序顺序介绍

    1)redhat的启动方式和执行次序是: 加载内核 执行init程序 /etc/rc.d/rc.sysinit          # 由init执行的第一个脚本 /etc/rc.d/rc $RUNLE ...

  9. FileZilla FTP 登录 问题

    1.一直报错220 (vsFTPd 3.0.2)-AUTH TLS 将加密方式选择为 “只是用普通FTP(不安全)”模式即可 2.服务器发回了不可路由的地址 “传输设置”,传输模式设置为主动.

  10. CSS margin属性与用法教程

    margin 属性是css用于在一个声明中设置所有 margin 属性的简写属性,margin是css控制块级元素之间的距离, 它们之间是透明不可见的. margin属性包含了margin left  ...