这里记录一下,以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. 解决Composer 使用时要求输入授权用户名密码问题

    使用Composer下载第三方包时出现: Authentication required (packagist.phpcomposer.com): Username: 解决方法: 1.修改源 comp ...

  2. python数据转换工具Into

    转:http://python.jobbole.com/81564/ 再次介绍Into包:整洁地数据迁移 2015/03/12 ·  基础知识 ·  into, 数据迁移 分享到:3 本文由 伯乐在线 ...

  3. (19)python扩展

    当python程序遇到瓶颈时,可以考略扩展其他语言 例如:程序的某部分,需要高速度,或者与硬件交互时可以用到C语言.当其他语言有现成的程序,重新起来很麻烦时.有些功能用别的语言写更方便时 扩展语言有  ...

  4. codeforces Round #441 A Trip For Meal【思路/模拟】

    A. Trip For Meal time limit per test 1 second memory limit per test 512 megabytes input standard inp ...

  5. codevs 方格取数

    1043 方格取数 2000年NOIP全国联赛提高组  时间限制: 1 s  空间限制: 128000 KB  题目等级 : 钻石 Diamond 题解  查看运行结果     题目描述 Descri ...

  6. notepad++ remove duplicate line

    To remove duplicate lines just press Ctrl + F, select the “Replace” tab and in the “Find” field, pla ...

  7. 选择快速源来加速linux系统更新

    sudo pacman-mirrors -c China -g 引用自manjaro百度贴吧

  8. 微信小程序开发教程(九)视图层——.wxss详解

    WXSS是一套样式语言,用于描述WXML的组件样式. 官方文档表示,WXSS的选择器目前支持(“.class”.“#id”.“elemnt”.“element,element”.“::after”.“ ...

  9. 【树形DP】Codeforces Round #395 (Div. 2) C. Timofey and a tree

    标题写的树形DP是瞎扯的. 先把1看作根. 预处理出f[i]表示以i为根的子树是什么颜色,如果是杂色的话,就是0. 然后从根节点开始转移,转移到某个子节点时,如果其子节点都是纯色,并且它上面的那一坨结 ...

  10. 【母函数】hdu1028 Ignatius and the Princess III

    大意是给你1个整数n,问你能拆成多少种正整数组合.比如4有5种: 4 = 4;  4 = 3 + 1;  4 = 2 + 2;  4 = 2 + 1 + 1;  4 = 1 + 1 + 1 + 1; ...