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. git 回滚指定行

    Stage the parts you want with git add -p, then discard (git checkout -- filename) the unstaged chang ...

  2. LPVOID 没有类型的指针

    可以将LPVOID类型的变量赋值给任意类型的指针,比如在参数传递时就可以把任意类型传递给一个LPVOID类型为参数的方法,然后在方法内再将这个“任意类型”从传递时的“LPVOID类型”转换回来. 示例 ...

  3. 关于微信里wx.getUserInfo获取用户信息都是拼音的转成中文方法

    加一个参数:lang:"zh_CN" 就可以了  1.  加在js里面 wx.getUserInfo({ lang:"zh_CN", success: func ...

  4. 细说一下position(定位),以及其他的小知识

    细说:position      位置 1.只要使用定位,必须要有一个相对的参照物.relative 2.具体定位的那个1元素需要加position:absolute:绝对的 绝对的:就是具体到某一个 ...

  5. gcd最大生成树模板

    出处: ACM International Collegiate Programming Contest, Egyptian Collegiate Programming ContestArab Ac ...

  6. online ddl与pt-osc详解

    Ⅰ.背景 优化sql的过程中发现表上少一个索引,直接加一个?会不会hang住?不加?sql又跑不好,由此引出一个问题--ddl操作怎么做? Ⅱ.闲扯三两句 5.6版本之前的MySQL创建索引不支持on ...

  7. xargs实例

    1. 当你使用rm命令去删除很多的文件时,你可能会得到错误信息:“/bin/rm Argument list too long – Linux”.这时可以用xargs来避免这个问题 find ~ -n ...

  8. The missing package manager for macOS (or Linux)

    The missing package manager for macOS (or Linux) — Homebrew https://brew.sh/

  9. DELPHI中完成端口(IOCP)的简单分析(1)

    DELPHI中完成端口(IOCP)的简单分析(1)   用DELPHI开发网络代码已经有一段时间了! 我发现在网上用VC来实现完成端口(IOCP)的代码很多,但是使用DELPHI来实现的就比较少了.对 ...

  10. 《Mysql 分区分表》

    一:分区/分表 为了什么? - 当MySQL单表的数据量过大时,数据库的访问速度会下降,需要处理大量数据,所以需要把数据分散存储. - 常用 "水平" 切分 二:MySQL常见的水 ...