The Guideline of Setting Up Samba Server on linux(Ubuntu)

  1. From terminate command window, install the samba package with follow command:

Sudo apt-get install samba

2. Edit the samba config with follow command:

Sudo vim /etc/samba/smb.conf

Add follow content for share folder myshare:

[global]                                                                                                 //设置samba服务整体环境

workgroup = WORKGROUP                                                 //设置工作组名称

server string = %h server (Samba, Ubuntu)                  //服务器说明

[myshare]                                                                                           //共享目录的名称

comment = my test share folder                                       //注释说明

path = /home/mostlee/testshare                                    //共享目录的路径

public = yes                                                                                //是yes/否no公开共享,若为否则进行身份验证(只有当security = share 时此项才起

writable = yes                                                        //是yes/否no不以只读方式共享当与read only发生冲突时,无视read only

browseable = yes                                                   //是yes/否no在浏览资源中显示共享目录,若为否则必须指定共享路径才能存取

guest ok = yes                                                                    //是yes/否no公开共享,若为否则进行身份验证(只有当security = share 时此项才起作用)

Share to everyone sample:

Share the folder for shareuser access with account/password:

3.  Restart samba service with follow command:

Sudo service smbd restart

The command to view the smbd service status:

Sudo service smbd status

4. Add a user to access the share folder:

useradd testshareuser

smbpasswd –a testshareuser                                                     set the user password.

5. Access the share from windows os:

View the linux machine’s ipaddress with ifconfig [eth0]

Maybe need to close the firewall, command like:

Service iptables stop

Now, we should access the share folder, in file explorer from windows machine,

url : \\192.168.1.100\myshare

  • For machine in azure, should add endpoints for accessing samba from the virtual machine.
    1. Login the https://portal.azure.com with manage account.
    2. Open the target VM’s property page from Virtual Machines section.
    3. On property page, open the networking page by clicking Networking under Settings node.
    4. Add inbound port rules for enpoints(137,138,139,445)
  • Some other general command for adding share user:

smbpasswd –a username                      add user

smbpasswd –d username                      disable the user

smbpasswd –e username                      enable the user

smbpasswd –n username                      set the user’s password to empty

smbpasswd –x username                      delete the user

The Guideline of Setting Up Samba Server on linux(Ubuntu)的更多相关文章

  1. How To Configure SAMBA Server And Transfer Files Between Linux & Windows

    If you are reading this article it means you have a network at home or office with Windows and Linux ...

  2. samba server install

    要求: create vnc service for win7 access it via vnc viewer. 1TB disk for this Centos PC is used as Sam ...

  3. [转]Android与电脑局域网共享之:Samba Server

    大家都有这样的经历,通过我的电脑或网上邻居访问另一台计算机上的共享资源,虽然电脑和手机之间可以有多种数据传输方式,但通过Windows SMB方式进行共享估计使用的人并不是太多,下面我就简单介绍一下, ...

  4. Samba: Server setup..

    To make samba shard folder permission clear, there are 3 kind of permission need to be paid attentio ...

  5. samba server 设置

     samba server  设置yum install samba.x86_64systemctl start smb.servicesystemctl enable smb.servicesamb ...

  6. How to configure Samba Server share on Debian 9 Stretch Linux

    Lubos Rendek Debian 13 June 2017 Contents 1. Objective 2. Operating System and Software Versions 3.  ...

  7. Samba Server possible problem and solving

    Configured samba server at RHEL7, problem encountered and solved. 1, yum install samba*, RHEL7 syste ...

  8. How to install Samba server on Ubuntu 12.04

    Part 1: Configuring anonymous share with samba server To install the samba package,enter the followi ...

  9. CentOS 7 samba server 配置

    samba是linux上的文件共享服务软件,相当与Windows上的共享文件夹,当然也是要在同一网段上的. 当前用的版本是4.4.4,好吧!下面介绍怎么去安装配置它,here we go! 1. 安装 ...

随机推荐

  1. PHP7.1安装xdebug

    一.前言1. Xdebug 简介Xdebug 是一个开放源代码的 PHP 程序调试器(即一个Debug工具),可以用来跟踪,调试和分析PHP程序的运行状况.当前最新版本为 Xdebug 2.5.0. ...

  2. Numpy学习

    决定陆陆续续写一些Numpy的例子.. 1. 如果想表示e的x次,就可以这样用,下面直接写一个sigmod函数: def sigmoid(z): return 1 / (1 + np.exp(-z)) ...

  3. JavaScript基础知识(函数)

    函数的基础 函数: 把实现相同功能的代码放到一个函数体中,当想实现这个功能时,直接执行这个函数即可:减少了的冗余:高内聚,低耦合--> 函数的封装: 函数:引用数据类型: var a = 10; ...

  4. Android开发网【申明:来源于网络】

    Android开发网[申明:来源于网络] 地址:http://www.jizhuomi.com/android/video/

  5. vb中的除法

    “\”:在Integer类型中,如果商带小数,则直接舍去小数部分,只保留整数部分.“/”:在Integer类型中,如果商带小数,则把小数部分以0.5为界限,小数部分大于0.5,则返回的整数部分+1:如 ...

  6. HDU 2612 - Find a way - [BFS]

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2612 Problem DescriptionPass a year learning in Hangz ...

  7. JSON.parse()和JSON.stringify()的解析与用途

    JSON.parse()和JSON.stringify()的解析与用途 1.parse用于从一个字符串中解析出json对象 如: var str = '{"name":" ...

  8. Python IDLE arcpy设置环境变量

    在IDLE中 import arcpy help(arcpy) 得到的路径为: 但是在arcmap中,路径为: 说明IDLE的环境变量设置有问题: 在windows的环境变量中设置环境变量PYTHON ...

  9. xss脚本绕过限制的方法

    第一关:第一关比较简单,直接写入标签就可以,这里不多说了,payload如下: http://sqler.win/xss/level1.php?name=test%3Csvg/onload=alert ...

  10. windows加固

    1. 账户管理和认证授权 1.1 账户 默认账户安全 禁用Guest账户. 禁用或删除其他无用账户(建议先禁用账户三个月,待确认没有问题后删除.) 操作步骤 打开 控制面板 > 管理工具 > ...