记录一次服务出错排错的过程,很多新手出了点错不百度直接巴拉巴拉的问,一般老手根据经验可以给出一点建议,但是由于个体环境的差异并不适用,反而埋怨起来。这种真的无F**K可说,所以要培养自己的排错能力是很重要的,这里简单的抛砖引玉的举出个流程出来希望有所帮助。问问题之前善用各大搜索引擎以及博客论坛的搜索功能!

# systemctl status smb.service -l
â— smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed -- :: CST; 1min 8s ago
Process: ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=)
Main PID: (code=exited, status=) May :: localhost.localdomain systemd[]: Starting Samba SMB Daemon...
May :: localhost.localdomain smbd[]: /usr/sbin/smbd: relocation error: /lib64/libsamba-credentials.so.: symbol GSS_KRB5_CRED_NO_CI_FLAGS_X, version gssapi_krb5_2_MIT not defined in file libgssapi_krb5.so. with link time reference
May :: localhost.localdomain systemd[]: smb.service: Main process exited, code=exited, status=/n/a
May 18 16:20:07 localhost.localdomain systemd[1]: Failed to start Samba SMB Daemon.
May 18 16:20:07 localhost.localdomain systemd[1]: smb.service: Unit entered failed state.
May 18 16:20:07 localhost.localdomain systemd[1]: smb.service: Failed with result 'exit-code'.

//从网络上找的类似出错,源错误日志忘记保存

#systemctl start smb 出错

第一步:samba可以用testparm命令来测试smb.conf配置档的合法性

[root@longlong Templates]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max () to minimum Windows limit ()
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions # Global parameters
[global]
workgroup = SAMBA
printcap name = cups
security = USER
idmap config * : backend = tdb
cups options = raw [homes]
comment = Home Directories
browseable = No
inherit acls = Yes
read only = No
valid users = %S %D%w%S [printers]
comment = All Printers
path = /var/tmp
browseable = No
printable = Yes
create mask = [print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
create mask =
directory mask =
write list = root

可以看到配置文件没有错误,排除此错误!~

第二步:使用自带命令 输出samba日志

[root@longlong Templates]# smbd -F -S
smbd: relocation error: /usr/lib64/samba/libgse-samba4.so: symbol krb5_get_init_creds_opt_set_pac_request, version krb5_3_MIT not defined in file libkrb5.so. with link time reference

找出错误原因lib库出错

解决 yum -y install krb5-devel.x86_64 krb5-libs.x86_64

错误原因:进一步分析,查看yum源 发现是公网阿里云源,安装了新版本,系统库文件支持还是老版本所以运行出错

security=share在新版中已经被废弃了 所以最后贴个4以上samba新版本

samba-4.6.2-8.el7.x86_64

建立匿名用户Linux和windows共享目录的配置文件:

[global]
        workgroup = SAMBA
        security = user

passdb backend = tdbsam

printing = cups
        printcap name = cups
        load printers = yes
        cups options = raw
        map to guest = Bad User

记一次samba排错 Failed to start Samba SMB Daemon.的更多相关文章

  1. 记一次zabbix排错(数据库安装在其它服务器上)

    记一次zabbix排错 故障现象 1.在/var/log/zabbix/zabbix_server.log中出现以下报错: 12106:20190314:090947.010 [Z3001] conn ...

  2. 记一次metasploitable2内网渗透之samba服务的攻击

    80端口中对应一些web靶场,在这里不记录 111端口的利用是向rpcbind服务的UDP套接字发送60字节载荷,便可填充目标内存,搞崩主机系统.在这里也不记录 Samba服务简介 Samba是在Li ...

  3. 久未更 ~ 四之 —— Vsftpd出现 Failed to start Vsftpd ftp daemon错误

    > > > > > 久未更 系列一:Failed to start Vsftpd ftp daemon错误 配置 vsftpd.conf文件后 重启ftp服务 出现 Fa ...

  4. 【error】Gradle sync failed: Unable to start the daemon process.【已解决】

    ---恢复内容开始--- 在克隆GIT项目后,Android Studio 报错: Gradle sync failed: Unable to start the daemon process. Th ...

  5. Failed to start Vsftpd ftp daemon错误

    配置 vsftpd.conf文件后 重启ftp服务出现 Failed to start Vsftpd ftp daemon错误 总是 启动失败 解决方法 将配置文件中的 listen=YES 改为 l ...

  6. SSH异常“Failed to start OpenSSH Server daemon”

    [root@bogon yum]# systemctl status sshd.service● sshd.service - OpenSSH server daemon   Loaded: load ...

  7. samba - 为 UNIX 实现的 Windows SMB/CIFS 文件服务器

    SYNOPSIS 总览 Samba DESCRIPTION 描述 samba 套件是在 UNIX 系统上实现“服务器信息块”(通常简称 SMB) 协议的一组程序.这个协议有时也称为“通用互联网文件系统 ...

  8. 记一次程序排错与std::getline

    今天忙活了半个下午,查找正式环境上面一个程序的问题.这个程序的作用是监控文件夹,处理每一个文件,分析每个文件的每行记录,然后将这个文件拆分成两个结果文件投放到另外两个不同的目录下面去,当处理完这个文件 ...

  9. 记一次sshd启动报错,Failed to start OpenSSH server daemon.

    sshd -t [root@mysql5-slave proj]# sshd -t @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ...

随机推荐

  1. golang中并发的相关知识

    golang中done channel理解:https://segmentfault.com/a/1190000006261218 golang并发模型之使用Context:https://segme ...

  2. cf1059D. Nature Reserve(三分)

    题意 题目链接 Sol 欲哭无泪啊qwq....昨晚一定是智息了qwq 说一个和标算不一样做法吧.. 显然\(x\)轴是可以三分的,半径是可以二分的. 恭喜你获得了一个TLE的做法.. 然后第二维的二 ...

  3. array_map()关于回调函数的总结

    array_map()函数的第一个参数可以是匿名函数,系统函数,也可以是自己自定义的函!在全局空间下,这些函数的调用都很简单 在这里就不多说了!我们主要讨论的是该函数调用类中的方法和静态方法的区别 摘 ...

  4. <Android开源库 ~ 1> GitHub Android Libraries Top 100 简介

    转载自GitHub Android Libraries Top 100 简介 本项目主要对目前 GitHub 上排名前 100 的 Android 开源库进行简单的介绍, 至于排名完全是根据 GitH ...

  5. spring-cloud构架微服务(1)-全局配置

    使用spring-cloud是基于熟悉springboot基础上进行的.本篇介绍全局配置,spring-boot版本就以1.4.0来做吧.项目地址: https://git.oschina.net/b ...

  6. 监控系统 - pnp4nagios

    pnp4nagios是nagios的一个插件,用于将perfdata数据写入rrd,用于展示流量图,目前最高版本0.6.25. 我用官方下载的tar.gz打rpm包,官方提供的pnp4nagios.s ...

  7. Java Map应用

    一.基本API使用方法 直接上代码,注释讲解 package com.map; import java.util.HashMap; import java.util.Iterator; import ...

  8. 基于FPGA的VGA显示设计(一)

    前言 FPGA主要运用于芯片验证.通信.图像处理.显示VGA接口的显示器是最基本的要求了. 原理 首先需要了解 : (1)VGA接口协议:VGA端子_维基百科 .VGA视频传输标准_百度 引脚1 RE ...

  9. 西门子(SIEMENS)软件安装时需要重启的解决方法,regedit restart

    打开注册表(regedit) 删除注册表项 HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manage\PendingFile ...

  10. 永恒之蓝EternalBlue复现

    0x01 漏洞原理:http://blogs.360.cn/blog/nsa-eternalblue-smb/ 目前已知受影响的 Windows 版本包括但不限于:Windows NT,Windows ...