Ubuntu 16.04 samba 配置

牧云@^-^@ 提交于 2020-01-21 22:10:07

1.首先在Ubuntu系统安装samba服务:

  sudo apt-get insall samba

2.创建共享目录:

  我一般直接把我的home目录整个共享。路径/home/xyp/;

  当然也可以新建其他目录。

3.修改samba配置文件:

  首先保存已有的配置文件:

    sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

  修改配置文件:

    在配置文件的末尾添加如下内容:

    [xyp]
      comment = Share Folder require password
      browseable = yes
      path = /home/xyp
      create mask = 0666
      directory mask = 0777
      valid users = xyp
      public = yes
      writable = yes
      available = yes

4.创建samba账户

  sudo touch /etc/samba/smbpasswd

  sudo smbpasswd -a xyp

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

5.重启samba服务器

  sudo /etc/init.d/samba restart

6.测试

  smbclient -L //localhost/xyp

7.windows映射磁盘

  计算机 -> 映射网络驱动器 -> \\server_ip\xyp -> 输入密码

  注意在windows的\\与linux中/的不同。

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!