Linux – samba is not starting/working

debianlinuxnetworkingsamba

I've tried a lot of things and I am at the end of my wits here. I ask humbly for help.

Basically smbd daemon refuses to start

I run sudo service samba restart

   Stopping Samba daemons: nmbd smbd.   
   Starting Samba daemons: nmbd smbd.

Everything seems fine but service samba status shows

  nmbd is running. 
  could not access PID file for smbd ... failed!
  • pgrep -l mbd show that only nmbd process is running

    2962 nmbd

  • I have no firewall setup

  • testparm -s /etc/samba/smb.conf show that everything is ok

    Loaded services file OK

  • network is up and everything (I can ping google at least)
    f

I even reinstalled samba , rebooted my computer

It used to work, now it does not

The only changes that I recall that I made since

  • I installed nfs (it cannot be that, at work nfs and samba are working with no problem)

  • I change the router ip address and dhcp address range (from 192.168.0.XXX to 192.168.1.XXX)

  • and setup static ip address to the linux (debian) running samba (192.168.1.102)

/var/log/samba/* logs are showing nothing, literaly no new line.

Best Answer

I'd like to try answering, but please be patient as I am new to sysadmin and this site.

Since you say that you reinstalled samba, I'm wondering if there's not something outside of that service as a possible problem. I'm wondering 3 things:
First, update your system totally
yum update all
Second, check what ports are being used to see if anything could conflict with samba
netstat - tupan
also try this for smb specific ports to see if anything else is on that port
netstat -tulpn | grep 445
and double-check to make sure your firewall isn't on after a reboot
service iptables stop
also try using nmblookup to find the server.
Third, run through this checklist (if you haven't)
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/diagnosis.html

For the smbd to be failing, it's something in the tcp/ip connection from the samba server. But smbd may be running from somewhere else already.