zoukankan      html  css  js  c++  java
  • Ubuntu14.04使用samba服务器共享Home目录

    这里记录一下,以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 \serverusername
    [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, \serverusername 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 \serverusername
    # 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.6homes(这里我的IP为192.168.1.6),输入用户名和密码(注意是刚才设置的samba用户密码),就可以看到设置成功。

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

  • 相关阅读:
    汇编语言
    离散数学:每条边的权重均不相同的带权图有唯一最小生成树
    android源码如何起步与阅读方法
    linux内核——会话、进程组、线程组
    ubuntu系统——增加磁盘空间
    Android系统源代码——所需工具
    android源码相关网站
    git——分布式版本控制系统
    linux内核——进程,轻量级进程,线程,线程组
    Android系统源代码学习步骤
  • 原文地址:https://www.cnblogs.com/inevermore/p/4199820.html
Copyright © 2011-2022 走看看