yum -y install samba samba-client samba-swat

/etc/init.d/smb start

chkconfig --level 35 smb on

cp -p /etc/samba/smb.conf    /etc/samba/smb.conf.orig

vim /etc/samba/smb.conf

        # logs split per machine
log file = /var/log/samba/%m.log
# max 50KB per log file, then rotate
; max log size = 50 # ----------------------- Standalone Server Options ------------------------
#
# Security can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration. security = share
passdb backend = tdbsam
[public]
comment = Public Stuff
path = /samba
public = yes
writable = yes

service sam restart
 service sab restart

testpara

window客户端访问

在网络位置中,右键添加一个一个网络位置,添加网络例如\\192.168.161.132\public

还需要添加账户登录

如何添加Samba用户

Window系统连上我们的开发机Linux,自然需要在Samba里添加一个新用户。

linux-06bq:/usr/local/services/samba/bin # ./smbpasswd -a sunjing
New SMB password:
Retype new SMB password:
Failed to add entry for user sunjing.

百度给出的结论是”添加的Samba用户首先必须是Linux用户”,一下子豁朗开郎。

linux-06bq:/etc/samba # useradd sunjing
linux-06bq:/usr/local/services/samba/bin # ./smbpasswd -a sunjing
New SMB password:
Retype new SMB password:
Added user sunjing.

接下来在Windows机器上【控制面板】→【凭证管理器】中添加Windows凭证:

网络地址:xxx.xxx.xxx.xxx(即需要连接的Linux开发机的IP)
用户名:sunjing
密码:给Samba添加sunjing用户时设置的密码

最后,在【资源管理器】里直接【映射网络驱动器】,连上开发机即可。

smbpasswd命令的常用方法

smbpasswd -a 增加用户(要增加的用户必须以是系统用户)
smbpasswd -d 冻结用户,就是这个用户不能在登录了
smbpasswd -e 恢复用户,解冻用户,让冻结的用户可以在使用
smbpasswd -n 把用户的密码设置成空.
             要在global中写入 null passwords -true
smbpasswd -x  删除用户

centos安装samba的更多相关文章

  1. Centos安装Samba共享服务器

    安装Samba 查看Samba是否已安装 1.# rpm -qa | grep samba

  2. centos安装samba服务和配置

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

  3. centos 安装samba

    1 安装 yum install samba samba-client samba-common -y 2 配置 vim /etc/samba/smb.conf 在最下面增加 [wolbo] path ...

  4. Centos 5.5下安装samba

    1.安装: Centos 5.5下安装samba,具体步骤如下: [root@bogon ~]# rpm -q samba Package samba is not installed [root@b ...

  5. CentOS下Samba文件服务器的安装与配置

    CentOS下Samba文件服务器的安装与配置 http://blog.csdn.net/limingzhong198/article/details/22064801 一.安装配置 1. 安装sam ...

  6. CentOS 6.3 安装 samba 共享(转)

    PHP环境在linux下,但是开发的时候用的是windows,于是我用了samba将linux的一个目录共享,然后在windows上做映射,这样就可以直接在windows下编辑linux上的文件了 首 ...

  7. Centos 7.4 安装samba服务

    # See smb.conf.example for a more detailed config file or # read the smb.conf manpage. # Run 'testpa ...

  8. [转载]centos下yum安装samba及配置

    centos下yum安装samba及配置 在我们使用 Windows 作为客户机的时候,通常有文件.打印共享的需求.作为Windows 网络功能之一,通常可以在 Windows 客户机之间通过Wind ...

  9. Centos 7 Samba服务安装

    Centos 7 Samba服务安装搭建Samba服务器是为了实现Linux共享目录之后,在Windows可以直接访问该共享目录. 查看是已安装samba包: rpm -qa | grep samba ...

随机推荐

  1. 删除个别主机的Know_hosts文件信息

    方法一: rm -rf ~/.ssh/known_hosts 缺点:把其他正确的公钥信息也删除,下次链接要全部重新经过认证 方法二: vi ~/.ssh/known_hosts 删除对应ip的相关rs ...

  2. 为Gem 添加环境设定

    如果在测试环境中 gem "rspec", :group => :test 当多个gem的时候 group :test do gem "webrat" g ...

  3. 圆形CD绘制 (扇形)

    参考: Egret教程Arc是使用示例:http://edn.egret.com/cn/article/index/id/673 我封装的工具类: /** * 圆形进度 * @author chenk ...

  4. 关于Jmeter3.0,你必须要知道的5点变化

    2016.5.18日,Apache 发布了jmeter 3.0版本,本人第一时间上去查看并下载使用了,然后群里或同事都会问有什么样变化呢?正好在网上看到一遍关于3.0的文章,但是是英文的.这里翻译一下 ...

  5. Unity3D笔记十七 Unity3D生命周期

    一个游戏组件的脚本有一个生命周期——一开始实例化,直到结束实例被销毁.在这期间,他们有时候处于激活状态,有时候处于非激活状态:对于活动,对用户有时候可见,有时候不可见 本文主要讨论常见脚本的的生命周期 ...

  6. backBone.js初识

    一.单页面应用 1.单页面应用(single-page application :SPA),是指在浏览器中运行的应用,在使用期间不会重新加载页面. 2.它所有的活动局限于一个Web页面,仅在初始化加载 ...

  7. Twig---和vue或angular前端框架并存

    <h1> {% verbatim %} {{message}} {% endverbatim %} </h1> 上面这种方式虽然能够解决,前台渲染的问题,但是还是会报错: 第二 ...

  8. vue报错 Uncaught TypeError: Cannot read property ‘children ’ of null

    Uncaught TypeError: Cannot read property ‘children ’ of null ratings未渲染完毕,就跳走goods了,取消默认跳转,即可

  9. Mongodb之使用rpm包安装配置启动

    下载rpm包 wget https://mirrors.aliyun.com/mongodb/yum/redhat/7Server/mongodb-org/3.2/x86_64/RPMS/mongod ...

  10. 从UE(用户体验)到道家誓学再到李小龙

    公司大Boss经常会给我做技术培训,感觉他什么都知道,也挺喜欢听他的课. 本文记录可能比较天马行空,我的语文比较差,很难把自己想表达的说出来,为此我就是记录一样关键字,可能这样还会更好些 背景是讲用户 ...