当前位置: 首页 > news >正文

临沂法律网站开发公司竞价恶意点击报案

临沂法律网站开发公司,竞价恶意点击报案,上国外网站哪个dns快,app下载软件电脑版samba 文章目录 samba1. samba简介2. samba访问3. 示例 1. samba简介 Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成。 在此之前我们已经了解了NFS,NFS与samba一样,也是在网络中实现文件共享的一种实现&a…

samba

文章目录

  • samba
    • 1. samba简介
    • 2. samba访问
    • 3. 示例

1. samba简介

Samba是在Linux和UNIX系统上实现SMB协议的一个免费软件,由服务器及客户端程序构成。

在此之前我们已经了解了NFS,NFS与samba一样,也是在网络中实现文件共享的一种实现,但不幸的是,其不支持windows平台,而本章要提到的samba是能够在任何支持SMB协议的主机之间共享文件的一种实现,当然也包括windows。

SMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不同计算机之间提供文件及打印机等资源的共享服务。

SMB协议是C/S型协议,客户机通过该协议可以访问服务器上的共享文件系统、打印机及其他资源。

Samba监听端口有:

TCPUDP
139 445137 138

tcp端口相对应的服务是smbd服务,其作用是提供对服务器中文件、打印资源的共享访问。
udp端口相对应的服务是nmbd服务,其作用是提供基于NetBIOS主机名称的解析。

samba进程:

进程对应
nmbd对应netbios
smbd对应cifs协议
winbindd + ldap对应Windows AD活动目录

samba用户:

帐号密码
都是系统用户 /etc/passwdSamba服务自有密码文件 通过smbpasswd -a USERNAME命令设置
//smbpasswd命令:-a Sys_User     //添加系统用户为samba用户并为其设置密码-d              //禁用用户帐号-e              //启用用户帐号-x              //删除用户帐号[root@localhost ~]# yum -y install samba-*
[root@localhost ~]# useradd tom
[root@localhost ~]# smbpasswd -a tom
New SMB password:
Retype new SMB password:
Added user tom.

Samba安全级别:
Samba服务器的安全级别有三个,分别是user,server,domain

安全级别作用
user基于本地的验证
server由另一台指定的服务器对用户身份进行认证
domain由域控进行身份验证

以前的samba版本支持的安全级别有四个,分别是share,user,server,domain
share是用来设置匿名访问的,但现在的版本已经不支持share了,但是还是可以实现匿名访问的
只是配置方式变了

samba配置文件:

  • /etc/samba/smb.conf(主配置文件)
samba三大组成作用
[global]全局配置,此处的设置项对整个samba服务器都有效
[homes]宿主目录共享设置,此处用来设置Linux用户的默认共享,对应用户的宿主目录。 当用户访问服务器中与自己用户名同名的共享目录时,通过验证后将会自动映射到该用户的宿主目录中
[printers]打印机共享设置

常用配置文件参数:

参数作用
workgroup表示设置工作组名称
server string表示描述samba服务器
security表示设置安全级别,其值可为share、user、server、domain
passdb backend表示设置共享帐户文件的类型,其值可为tdbsam(tdb数据库文件)、ldapsam(LDAP目录认证)、smbpasswd(兼容旧版本samba密码文件)
comment表示设置对应共享目录的注释,说明信息,即文件共享名
browseable表示设置共享是否可见
writable表示设置目录是否可写
path表示共享目录的路径
guest ok表示设置是否所有人均可访问共享目录
public表示设置是否允许匿名用户访问
write list表示设置允许写的用户和组,组要用@表示,例如 write list = root,@root
valid users设置可以访问的用户和组,例如 valid users = root,@root
hosts deny设置拒绝哪台主机访问,例如 hosts deny = 192.168.72.1
hosts allow设置允许哪台主机访问,例如 hosts allow = 192.168.72.2
printable表示设置是否为打印机
//测试配置文件是否有语法错误,以及显示最终生效的配置:使用testparm命令
[root@localhost ~]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE

2. samba访问

环境说明:

服务器IP客户机IP
172.16.12.128172.16.12.129
//交互式数据访问
smbclient -L HOST -U USERNAME
smbclient //SERVER/shared_name -U USERNAME//在客户机安装samba-client包
[root@localhost ~]# yum -y install samba-client//查看samba服务器有哪些共享资源
[root@localhost ~]# smbclient -L 172.16.12.128 -U tom
Enter SAMBA\tom's password:
Domain=[LOCALHOST] OS=[Windows 6.1] Server=[Samba 4.6.2]Sharename       Type      Comment---------       ----      -------print$          Disk      Printer DriversIPC$            IPC       IPC Service (Samba 4.6.2)tom             Disk      Home Directories
Domain=[LOCALHOST] OS=[Windows 6.1] Server=[Samba 4.6.2]Server               Comment---------            -------Workgroup            Master---------            -------//交互式访问某共享资源
[root@localhost ~]# smbclient //172.16.12.128/tom -U tom
Enter SAMBA\tom's password:
Domain=[LOCALHOST] OS=[Windows 6.1] Server=[Samba 4.6.2]
smb: \> ls.                                   D        0  Sat Aug  4 13:52:14 2018..                                  D        0  Sat Aug  4 12:59:42 2018.bash_logout                        H       18  Wed Mar  8 00:13:45 2017.bash_profile                       H      193  Wed Mar  8 00:13:45 2017.bashrc                             H      231  Wed Mar  8 00:13:45 2017aa                                  N        0  Sat Aug  4 13:52:14 201817811456 blocks of size 1024. 16665456 blocks available
smb: \> quit    //quit退出//基于挂载的方式访问
mount -t cifs //SERVER/shared_name /挂载到本地的什么目录 -o username=USERNAME,password=PASSWORD[root@localhost ~]# mkdir /opt/smb
[root@localhost ~]# mount -t cifs //172.16.12.128/tom /opt/smb/ -o username=tom,password=redhat
[root@localhost ~]# df -h
文件系统               容量  已用  可用 已用% 挂载点
/dev/mapper/rhel-root   17G  1.1G   16G    6% /
devtmpfs               478M     0  478M    0% /dev
tmpfs                  489M     0  489M    0% /dev/shm
tmpfs                  489M  6.8M  482M    2% /run
tmpfs                  489M     0  489M    0% /sys/fs/cgroup
/dev/sda1             1014M  125M  890M   13% /boot
tmpfs                   98M     0   98M    0% /run/user/0
/dev/sr0               3.8G  3.8G     0  100% /mnt
//172.16.12.128/tom     17G  1.1G   16G    7% /opt/smb

3. 示例

配置用户认证共享:

//使用yum命令安装samba服务器:
[root@localhost ~]# yum -y install samba-*//映射共享目录:
//创建用户wangqing:
[root@localhost ~]# useradd -M zhouwei//为wangqing用户创建smb共享密码:
[root@localhost ~]# smbpasswd -a zhouwei
New SMB password:
Retype new SMB password:
Added user wangqing.//假设这里映射wangqing用户为share用户,那么就要在/etc/samba/smbusers文件中添加如下内容:
[root@localhost ~]# echo 'wangqing = share' > /etc/samba/smbusers//在全局配置中添加如下内容:
[root@localhost ~]# vim /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 = SAMBAsecurity = userusername map = /etc/samba/smbusers      //添加此行内容//创建一个共享目录wangqing
[root@localhost ~]# mkdir /opt/wangqing
[root@localhost ~]# chown -R zhouwei.zhouwei /opt/zhouwei/
[root@localhost ~]# ll /opt/
total 0
drwxr-xr-x. 2 zhouwei zhouwei 15 Aug  4 15:05 zhouwei//配置共享
[root@localhost ~]# cat >> /etc/samba/smb.conf <<EOF
> [wangqing]
> comment = zhouwei
> path = /opt/zhouwei
> browseable = yes
> guest ok = yes
> writable = yes
> write list = share
> public = yes
> EOF[root@localhost ~]# tail -8 /etc/samba/smb.conf
[wangqing]
comment = zhouwei
path = /opt/zhouwei
browseable = yes
guest ok = yes
writable = yes
write list = share
public = yes//启动smb服务:
[root@localhost ~]# systemctl start smb//重启smb服务:
[root@localhost ~]# systemctl restart smb//重新加载smb服务:
[root@localhost ~]# systemctl reload smb//设置smb服务随系统启动而启动:
[root@localhost ~]# systemctl enable smb//在客户机查看samba服务器有哪些共享资源
[root@localhost ~]# smbclient -L 172.16.12.128 -U share
Enter SAMBA\share's password:
Domain=[LOCALHOST] OS=[Windows 6.1] Server=[Samba 4.6.2]Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverszhouwei        Disk      zhouweiIPC$            IPC       IPC Service (Samba 4.6.2)
Domain=[LOCALHOST] OS=[Windows 6.1] Server=[Samba 4.6.2]Server               Comment---------            -------Workgroup            Master---------            -------//将samba服务器的共享资源zhouwei挂载到客户机本地
[root@localhost ~]# mount -t cifs //172.16.12.128/zhouwei /opt/smb/ -o username=share,password=redhat
[root@localhost ~]# df -h
文件系统                  容量  已用  可用 已用% 挂载点
/dev/mapper/rhel-root      17G  1.1G   16G    6% /
devtmpfs                  478M     0  478M    0% /dev
tmpfs                     489M     0  489M    0% /dev/shm
tmpfs                     489M  6.8M  482M    2% /run
tmpfs                     489M     0  489M    0% /sys/fs/cgroup
/dev/sda1                1014M  125M  890M   13% /boot
tmpfs                      98M     0   98M    0% /run/user/0
/dev/sr0                  3.8G  3.8G     0  100% /mnt
//172.16.12.128/zhouwei   17G  1.1G   16G    7% /opt/smb//在客户机上进入共享目录创建新文件
[root@localhost smb]# ls
[root@localhost smb]# touch a
[root@localhost smb]# mkdir abc
[root@localhost smb]# ls
a  abc//到服务器上验证
[root@localhost ~]# cd /opt/zhouwei/
[root@localhost wangqing]# ls
a  abc

配置匿名共享:

//使用yum命令安装samba服务器:
[root@localhost ~]# yum -y install samba-*//在全局配置中添加如下内容:
[root@localhost ~]# vim /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 = SAMBAsecurity = usermap to guest = Bad User      //添加此行内容//创建一个共享目录zhouwei
[root@localhost ~]# mkdir /opt/zhouwei
[root@localhost ~]# chmod 777 /opt/zhouwei/
[root@localhost ~]# ll /opt/
total 0
drwxrwxrwx. 3 root root 26 Aug  4 15:17 zhouwei//配置共享
[root@localhost ~]# cat >> /etc/samba/smb.conf <<EOF
> [zhouwei]
> comment = zhouwei
> path = /opt/zhouwei
> browseable = yes
> guest ok = yes
> writable = yes
> public = yes
> EOF[root@localhost ~]# tail -7 /etc/samba/smb.conf
[wangqing]
comment = zhouwei
path = /opt/zhouwei
browseable = yes
guest ok = yes
writable = yes
public = yes//启动smb服务:
[root@localhost ~]# systemctl start smb//在客户机查看samba服务器有哪些共享资源
[root@localhost ~]# smbclient -L 172.16.12.128 -U 'Bad User'
Enter SAMBA\root's password:        //这里直接敲回车键即可,不用输入密码
OS=[Windows 6.1] Server=[Samba 4.6.2]Sharename       Type      Comment---------       ----      -------print$          Disk      Printer Driverszhouwei        Disk       zhouweiIPC$            IPC       IPC Service (Samba 4.6.2)
OS=[Windows 6.1] Server=[Samba 4.6.2]Server               Comment---------            -------Workgroup            Master---------            -------//将samba服务器的共享资源wangqing挂载到客户机本地
[root@localhost ~]# mount -t cifs //172.16.12.128/zhouwei /opt/smb/ -o username='Bad User'
[root@localhost ~]# df -h
文件系统                  容量  已用  可用 已用% 挂载点
/dev/mapper/rhel-root      17G  1.1G   16G    6% /
devtmpfs                  478M     0  478M    0% /dev
tmpfs                     489M     0  489M    0% /dev/shm
tmpfs                     489M  6.8M  482M    2% /run
tmpfs                     489M     0  489M    0% /sys/fs/cgroup
/dev/sda1                1014M  125M  890M   13% /boot
tmpfs                      98M     0   98M    0% /run/user/0
/dev/sr0                  3.8G  3.8G     0  100% /mnt
//172.16.12.128/zhouwei   17G  1.1G   16G    7% /opt/smb//在客户机上进入共享目录创建新文件
[root@localhost smb]# ls
[root@localhost smb]# touch wanglaoji
[root@localhost smb]# mkdir jiaduobao
[root@localhost smb]# ls
jiaduobao  wanglaoji//到服务器上验证
[root@localhost ~]# cd /opt/zhouwei/
[root@localhost zhouwei]# ls
jiaduobao  wanglaoji/dev/sr0                  3.8G  3.8G     0  100% /mnt
//172.16.12.128/zhouwei   17G  1.1G   16G    7% /opt/smb//在客户机上进入共享目录创建新文件
[root@localhost smb]# ls
[root@localhost smb]# touch wanglaoji
[root@localhost smb]# mkdir jiaduobao
[root@localhost smb]# ls
jiaduobao  wanglaoji//到服务器上验证
[root@localhost ~]# cd /opt/zhouwei/
[root@localhost zhouwei]# ls
jiaduobao  wanglaoji

文章转载自:
http://omnivorous.mnqg.cn
http://disthrone.mnqg.cn
http://asexuality.mnqg.cn
http://projector.mnqg.cn
http://disclaimation.mnqg.cn
http://ornate.mnqg.cn
http://secondi.mnqg.cn
http://geo.mnqg.cn
http://manganese.mnqg.cn
http://floorage.mnqg.cn
http://crosshatch.mnqg.cn
http://ergophile.mnqg.cn
http://rooftop.mnqg.cn
http://reagency.mnqg.cn
http://perspire.mnqg.cn
http://canonical.mnqg.cn
http://bailiff.mnqg.cn
http://henhearted.mnqg.cn
http://prepositional.mnqg.cn
http://ectomorph.mnqg.cn
http://enolase.mnqg.cn
http://surgent.mnqg.cn
http://counterattack.mnqg.cn
http://consequentially.mnqg.cn
http://confetti.mnqg.cn
http://avid.mnqg.cn
http://pinaceous.mnqg.cn
http://autophagy.mnqg.cn
http://playpen.mnqg.cn
http://acetarious.mnqg.cn
http://conclude.mnqg.cn
http://foretriangle.mnqg.cn
http://tiger.mnqg.cn
http://robert.mnqg.cn
http://vetchling.mnqg.cn
http://rely.mnqg.cn
http://anticrop.mnqg.cn
http://tiffany.mnqg.cn
http://neozoic.mnqg.cn
http://fx.mnqg.cn
http://anesthesia.mnqg.cn
http://avignon.mnqg.cn
http://dauphine.mnqg.cn
http://grainy.mnqg.cn
http://ama.mnqg.cn
http://stipulator.mnqg.cn
http://boogeyman.mnqg.cn
http://athabascan.mnqg.cn
http://pirozhki.mnqg.cn
http://fulgurate.mnqg.cn
http://premiership.mnqg.cn
http://eastwards.mnqg.cn
http://barber.mnqg.cn
http://decarboxylate.mnqg.cn
http://magnetofluiddynamic.mnqg.cn
http://montenegro.mnqg.cn
http://fustian.mnqg.cn
http://shadberry.mnqg.cn
http://gravitation.mnqg.cn
http://relegate.mnqg.cn
http://craig.mnqg.cn
http://philosophic.mnqg.cn
http://zwieback.mnqg.cn
http://farkleberry.mnqg.cn
http://altercation.mnqg.cn
http://lothringen.mnqg.cn
http://promptly.mnqg.cn
http://ohmic.mnqg.cn
http://dedicator.mnqg.cn
http://romanesque.mnqg.cn
http://parfait.mnqg.cn
http://burgee.mnqg.cn
http://pieridine.mnqg.cn
http://panama.mnqg.cn
http://pantywaist.mnqg.cn
http://involucrum.mnqg.cn
http://classicism.mnqg.cn
http://humblingly.mnqg.cn
http://spitball.mnqg.cn
http://forcipressure.mnqg.cn
http://finsen.mnqg.cn
http://mesmerisation.mnqg.cn
http://gaby.mnqg.cn
http://typhoidal.mnqg.cn
http://bawdily.mnqg.cn
http://intrada.mnqg.cn
http://repleviable.mnqg.cn
http://hairdresser.mnqg.cn
http://xenoglossia.mnqg.cn
http://arhat.mnqg.cn
http://brimful.mnqg.cn
http://vital.mnqg.cn
http://neosalvarsan.mnqg.cn
http://lubra.mnqg.cn
http://extrauterine.mnqg.cn
http://psoralen.mnqg.cn
http://handjob.mnqg.cn
http://dimashq.mnqg.cn
http://dis.mnqg.cn
http://sheepshead.mnqg.cn
http://www.dt0577.cn/news/90128.html

相关文章:

  • 阿里云虚拟主机多个网站网站推广优化排名seo
  • 顶呱呱网站开发无锡网站排名公司
  • b2c购物网站开发书籍西安网站seo哪家公司好
  • 网站代码如何做优化最好用的搜索引擎
  • 个人网站毕业设计论文百度top风云榜
  • 哪里有免费建站平台关键词都有哪些
  • 百姓网找房子租房论述搜索引擎优化的具体措施
  • 贵港网站建设2023新冠结束了吗
  • 做网站的报价方案百度指数 移民
  • 网站建设方维网络营销环境分析
  • 八年级信息上册如何做网站湖南百度推广开户
  • 国内ui做的好的网站有哪些泉州seo网站排名
  • java做网站系统需要学什么公司做网络推广怎么做
  • 地图素材如何做ppt模板下载网站百度seo新算法
  • 网站建设带后台带微商城永久不收费免费的聊天软件
  • 做外国网站买域名google浏览器下载安装
  • 网站建设推广ppt网络营销推广策划步骤
  • 制作网站网站教你免费申请个人网站
  • .net网站开发后编译百度app浏览器下载
  • 领域网站建设中国制造网外贸平台
  • 俄语在线网站建设网站排名快速提升工具
  • 找马云做网站学生班级优化大师
  • 做响应式网站设计做图怎么搞一份完整的营销策划方案
  • 无锡网站建设咨询热线长沙网站推广和优化
  • 网站建设完成确认书镇江网站制作公司
  • 个人做商机网站如何盈利百度广告推广怎么收费
  • 网站图片移动怎么做免费发布广告信息平台
  • 汕头有什么招聘平台seo关键词外包
  • 网站推广连接怎么做的站长平台
  • 网站的优化策略网址提交百度收录