Summer's Blog
酷炫主页
✨运维
🎉安装
👀踩坑
  • k8s
  • shell
  • python
  • redis
  • elasticsearch
  • mysql
  • ceph
  • spark
  • 关于
  • 思维
  • 命令
  • 友链
  • 分类
  • 标签
  • 归档
GitHub

Summer———夏苏文

💨运维界的前行者
酷炫主页
✨运维
🎉安装
👀踩坑
  • k8s
  • shell
  • python
  • redis
  • elasticsearch
  • mysql
  • ceph
  • spark
  • 关于
  • 思维
  • 命令
  • 友链
  • 分类
  • 标签
  • 归档
GitHub
  • vim使用技巧

  • zabbix使用技巧

  • linux使用技巧

    • 查看隐藏文件大小
    • 修改 hostname
    • 查看硬盘大小
    • 各种cd之间的区别汇总
    • 查看CPU个数
    • 查看当前目录文件数
    • rwxrwxr含义
    • 查看占用内存CPU最多进程
    • yum下载 RPM 包
    • rz命令和sz命令使用方法
    • 服务器ntp时间同步
    • ssh免密配置
    • samba的配置和使用
      • 1.安装samba
      • 2.配置
      • 3.加载并重启
      • 4.验证
    • root盘满了怎么办
    • 如何替换jar中的jar配置
    • Linux启动流程
    • 统计脚本执行时间
    • 批量替换示例
    • 大文件切割技巧
    • 一条命令让CPU嗨起来
    • 记录服务器raid操作
    • linux测试网速
    • VM虚拟机扩容操作
    • linux如何快速删除大文件
    • 正则处理文本记录
    • linux测试硬盘读写操作
    • 根据进程查看文件位置
    • iostat查看硬盘读写速度
  • mysql使用技巧

  • docker使用技巧

  • k8s使用技巧

  • redis使用技巧

  • elasticsearch使用技巧

  • window使用技巧

  • nginx使用技巧

  • ansible使用技巧

  • 运维
  • linux使用技巧
summer
2020-01-29

samba的配置和使用

SMB是一种Linux、UNIX系统上可用于共享文件和打印机等资源的协议,这种协议是基于Client\Server型的协议,Client端可以通过SMB访问到Server(服务器)上的共享资源。当Windows是 Client,CentOS是服务器时,通过Samba就可以实现window访问Linux的资源,实现两个系统间的数据交互。

# 1.安装samba

yum install samba -y

# 2.配置

[root@summer]# vim /etc/samba/smb.conf
[root@summer]# cat  /etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[global]
        workgroup = SAMBA
        security = user
        passdb backend = tdbsam
        create mask = 0775
        force create mode = 0755
        directory mask = 0755
        printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw

[homes]
        comment = Home Directories
        valid users = %S, %D%w%S
        browseable = No
        read only = No
        inherit acls = Yes

[printers]
        comment = All Printers
        path = /var/tmp
        printable = Yes
        create mask = 0600
        browseable = No

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/drivers
        write list = @printadmin root
        force group = @printadmin
        create mask = 0664
        directory mask = 0775
[summer]
        comment = summer guest share
        path = /home/summer
        public = yes
        writable = yes
        directory mask = 0775
        create mask = 0775
        valid users = summer,root
        write list = summer,root
        browseable = yes
        available = yes

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

# 3.加载并重启

systemctl restart smb.service
systemctl restart nmb.service
systemctl status smb.service
1
2
3

# 4.验证

  • 此时选择映射网络驱动器,文件夹:\\IP\summer 并输入密码即可访问linux上的文件了,从此卸载FTP,直接拖拽文件就相当于上传了
编辑
#linux
上次更新: 2/20/2021, 6:15:47 PM
ssh免密配置
root盘满了怎么办

← ssh免密配置 root盘满了怎么办→

最近更新
01
三大漏洞扫描工具报告获取
05-24
02
MongoDB使用iscsi
03-04
03
Python通过librbd操作ceph
02-28
更多文章>
Theme by Vdoing | Copyright © 2019-2022 夏苏文 | MIT License

网站已在灾难中运行:

总访问量 次 | 您是第 位访客
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式