centos7中如何安装samba
发表于:2025-02-02 作者:千家信息网编辑
千家信息网最后更新 2025年02月02日,本篇文章给大家分享的是有关centos7中如何安装samba,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。关闭防火墙[root@loca
千家信息网最后更新 2025年02月02日centos7中如何安装samba关闭防火墙
关闭selinux
安装
安装包说明
配置服务
添加账户(添加的账户必须linux已经创建的)
直接添加用户test会导致失败
创建linux账户
创建samba用户
删除samba用户
客户端访问共享目录
本篇文章给大家分享的是有关centos7中如何安装samba,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
关闭防火墙
[root@localhost ~]# systemctl stop firewalld.service [root@localhost ~]# systemctl disable firewalld.service Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.1234
关闭selinux
[root@localhost ~]# cat /etc/selinux/config # This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.# SELINUX=enforcingSELINUX=disabled# SELINUXTYPE= can take one of three two values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected. # mls - Multi Level Security protection.SELINUXTYPE=targeted1234567891011121314
安装
[root@localhost ]# yum install samba#查看[root@localhost ]# rpm -qa | grep sambasamba-common-libs-4.8.3-4.el7.x86_64samba-libs-4.8.3-4.el7.x86_64samba-common-tools-4.8.3-4.el7.x86_64samba-common-4.8.3-4.el7.noarchsamba-client-libs-4.8.3-4.el7.x86_64samba-4.8.3-4.el7.x86_64samba-client-4.8.3-4.el7.x86_6412345678910111213
安装包说明
samba-common-3.5.10-125.el6.x86_64 //主要提供samba服务器的设置文件与设置文件语法检验程序testparmsamba-client-3.5.10-125.el6.x86_64 //客户端软件,主要提供linux主机作为客户端时,所需要的工具指令集samba-swat-3.5.10-125.el6.x86_64 //基于https协议的samba服务器web配置界面samba-3.5.10-125.el6.x86_64 //服务器端软件,主要提供samba服务器的守护程序,共享文档,日志的轮替,开机默认选项1234
配置服务
安装后会生成/etc/samba目录,
#======================= Global Settings =====================================[global] # ----------------------- Network Related Options -------------------------## workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH## server string is the equivalent of the NT Description field## netbios name can be used to specify a server name not tied to the hostnameworkgroup = WORKGROUP server string = Liuyunsheng Samba Server Version %v netbios name = Liuyunsheng-Samba # --------------------------- Logging Options -----------------------------## Log File let you specify where to put logs and how to split them up.log file = /var/log/samba/log.%m # ----------------------- Standalone Server Options ------------------------## Scurity can be set to user, share(deprecated) or server(deprecated)security = user map to guest = Bad User #============================ Share Definitions ==============================[public] comment = Public Stuff path = /home/test/testwriteable = yespublic = yes 123456789101112131415161718192021222324252627282930313233343536
# 启动smb服务[root@localhost samba]# systemctl start smb[root@localhost samba]# systemctl status smb● smb.service - Samba SMB Daemon Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled) Active: active (running) since Thu 2019-04-25 14:44:24 CST; 3s ago Docs: man:smbd(8) man:samba(7) man:smb.conf(5) Main PID: 22111 (smbd) Status: "smbd: ready to serve connections..." Memory: 8.3M CGroup: /system.slice/smb.service ├─22111 /usr/sbin/smbd --foreground --no-process-group ├─22115 /usr/sbin/smbd --foreground --no-process-group ├─22116 /usr/sbin/smbd --foreground --no-process-group └─22117 /usr/sbin/smbd --foreground --no-process-groupApr 25 14:44:24 localhost.localdomain systemd[1]: Starting Samba SMB Daemon...Apr 25 14:44:24 localhost.localdomain smbd[22111]: [2019/04/25 14:44:24.814732, 0] ../lib/util/become_daemon.c:138(daemon_ready)Apr 25 14:44:24 localhost.localdomain smbd[22111]: daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connectionsApr 25 14:44:24 localhost.localdomain systemd[1]: Started Samba SMB Daemon.12345678910111213141516171819202122
添加账户(添加的账户必须linux已经创建的)
直接添加用户test会导致失败
[root@localhost share]# smbpasswd -a testUnknown parameter encountered: " map to guest"Ignoring unknown parameter " map to guest"New SMB password:Retype new SMB password:Failed to add entry for user test.123456
创建linux账户
[root@localhost share]# groupadd test -g 6000[root@localhost share]# useradd test -u 6000 -g 6000 -s /sbin/nologin -d /dev/nulluseradd: warning: the home directory already exists.Not copying any file from skel directory into it.12345
创建samba用户
[root@localhost share]# smbpasswd -a testUnknown parameter encountered: " map to guest"Ignoring unknown parameter " map to guest"New SMB password:Retype new SMB password:Added user test.1234567
删除samba用户
[root@localhost samba]# smbpasswd -x testDeleted user test.1234
客户端访问共享目录
在windows输入\\19.6.6.192然后输入设置的用户名和密码就可以了,并且可以将连接的文件夹映射为网络驱动器,这样就可以直接操作了1234
以上就是centos7中如何安装samba,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注行业资讯频道。
服务
服务器
用户
客户
客户端
文件
账户
更多
目录
知识
程序
篇文章
软件
输入
配置
实用
主机
密码
就是
工作会
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
融媒体中心缺少网络技术人员
软件开发语言的发展史
数据库管理系统怎么建立表格
什么是网络安全的手抄报内容
mysql导出数据库的表
软件开发公司办公室装修图
数据库双淘汰
湖北专业网络技术分类服务标准
ftp上传服务器文件
网络安全测试工具框架
数据库及表的创建与管理简答题
钓鱼软件开发的意义
学校开展网络安全会议简报
软件开发采购的硬件会计科目
北京职业软件开发价格行情
民族宗教局网络安全自查报告
手机网络安全检测软件有哪些
oracle数据库编辑器
云终端网络加速服务器
起床战争拔刀剑服务器怎么起飞
显卡涡轮风扇服务器
网络安全技能大赛人社部
移动端上的软件开发
oem预装数据库是正版吗
kof97怎么设计服务器
农村小学网络安全课件
手机远程ftp服务器
生存战争什么版本有服务器
腾讯云轻量应用服务器密码
数据库手动插入数据