这里记录一下,以Ubuntu 14.04为例。

 

1.安装samba服务器。

sudo apt-get install samba

2.修改配置文件

sudo vim /etc/samba/smb.conf

然后找到home目录共享的部分,大概是190-214行,将前面的注释去掉,如下:

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
[homes]
comment = Home Directories
browseable = yes # By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
read only = no # File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0666 # Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0755 # By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
valid users = %S

这里的掩码我稍微做了修改。

 

3.修改samba用户密码。

例如我的用户名是wing,那么需要创建一个相应的密码,用于samba共享,这个密码跟系统账户那个是不同的。

sudo smbpasswd -a wing

然后重启samba服务

sudo service smbd restart

4.在windows的资源管理器中打开\\192.168.1.6\homes(这里我的IP为192.168.1.6),输入用户名和密码(注意是刚才设置的samba用户密码),就可以看到设置成功。

 

如果感觉不太方便,可以把这个地址映射为文件夹或者一个虚拟的磁盘。

Ubuntu14.04使用samba服务器共享Home目录的更多相关文章

  1. 配置samba 服务器 共享Linux目录

    配置samba 服务器 共享Linux目录 1.安装: yum install -y samba* 2.修改配置文件 vim /etc/samba/smb.conf [web] path = /usr ...

  2. Ubuntu12.04下samba服务器共享配置

    1 . 前置工作 首先保证你的Ubuntu能上网:虚拟机网络连接方式为NAT:虚拟机雨物理机互ping可通: 2. 安装samba sudo apt-get insall samba sudo apt ...

  3. Ubuntu14.04 mount远程服务器上的目录

    备忘用. 一,远程服务器设置: 1,在/etc/exports中添加如下配置: /home/xxx *(insecure,rw,sync,no_root_squash,anonuid=123,anon ...

  4. Ubuntu14.04安装samba

    Ubuntu14.04安装samba 按照惯例,首先介绍Samba.Samba是在Linux系统上实现的SMB(Server Messages Block,信息服务块)协议的一款免费软件.它实现在局域 ...

  5. Ubuntu 18.04安装Samba服务器及配置

    Ubuntu 18.04安装Samba服务器及配置 局域网下使用samba服务在Linux系统与Windows系统直接共享文件是一项很方便的操作.以Ubuntu为例配置samba服务,Linux服务器 ...

  6. FTP服务器 vsftp samba服务器 共享 smb

    FTP服务器 vsftp samba服务器 共享 smb 马哥视频 参考1 参考3 参考2 参考4 vsftp服务器实现匿名用户上传.修改权限和一些设置 win7访问 地址栏输入   ftp://账号 ...

  7. VM中 Ubuntu14.04 中Samba的安装配置和使用

    以前都是在Redhat 上搭建samba,现在改成在ubuntu12.04 上搭建发现 sudo /etc/init.d/samba restart  始终不行,原来,现在ubuntu下,启动服务要用 ...

  8. Ubuntu14.04下FTP服务器的搭建配置 标签: ubuntuftp服务器虚拟机 2017-06-13 15:24 161人阅读 评

    首先说明一下,我是在虚拟机中装的Ubuntu14.04,物理机是Win10,最初只是为了在两个系统间传输文件才在Ubuntu中安装了ftp服务器,从Windows端登陆其即可.最初也是按照网上的各种教 ...

  9. Ubuntu 16.04下Samba服务器搭建和配置(配截图)

    一.相关介绍 Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成.SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和 ...

随机推荐

  1. codevs 1085

    数字游戏 2003年NOIP全国联赛普及组 时间限制: s 空间限制: KB 题目等级 : 黄金 Gold 题解 题目描述 Description 丁丁最近沉迷于一个数字游戏之中.这个游戏看似简单,但 ...

  2. Ubuntu16.04 PPA方式安装JDK1.8

    一.删除OpenJDK:   sudo apt-get purge openjdk* 二.添加PPA: root@ubuntu:~# add-apt-repository ppa:webupd8tea ...

  3. python 模拟登陆园子

    主要用到了python cookielib,urllib2,urllib这3个模块,python 不亏是具有 先天做 爬虫的特质,废话多说直接上代码 #coding: utf- import sys ...

  4. [BZOJ3209]花神的数论题 组合数+快速幂

    3209: 花神的数论题 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 2498  Solved: 1129[Submit][Status][Disc ...

  5. docker容器间通信

    现在在我们的docker中已经有了三个容器,分别是DB/API/UI三个容器,三个容器间肯定是要进行互相通信的 可以查看docker的官方文档,https://docs.docker.com/engi ...

  6. HDU 1754.I Hate It-结构体版线段树(单点更新+区间查询最值)

    I Hate It Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total S ...

  7. flutter 频道切换

    https://github.com/flutter/flutter/wiki/Flutter-build-release-channels 频道说明页 https://flutter.dev/doc ...

  8. Verilog的IDE Quartus II

    Quartus II  主要用于Verilog的开发,他是开发FPGA的利器,但他需要和modelsim相互配合,才能实现它的编写和仿真.modelsim是第三方的EDA,需要另外安装,对于Quart ...

  9. UVA 11624 Fire!【两点BFS】

    Joe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the m ...

  10. Linux命令之quota

    quota [-guqvswim] [-l | [-Q | -A] ] [-F quotaformat] quota [-qvswim] [-l | [-Q | -A]] [-F quotaforma ...