Mailinglist Archive: opensuse (880 mails)

< Previous Next >
Re: [opensuse] nmbd does not start at boot in openSUSE 12.2
Istvan Gabor said the following on 08/05/2013 07:22 AM:
Anton,

I haven't received your answer in my mailbox, so I am copy-pasting it from the
web-site:

That's curious ...

[Big Snip]


If you are using systemd then the daemons start via .service descriptions.
Grep around to see what the one that starts smbd contains and see if there is
one that isn't enables for nmbd and winbindd. Try starting the manually as
described in
https://bbs.archlinux.org/viewtopic.php?id=147305

If that works then enable them (as described in many other threads here), but
do check dependencies (and required files, libraries, directories etc) and the
order they should come up.

----------------------------------------------------------------------------------------

Unfortunately it did not help.

1. It took a long time until I found out that the service names in openSUSE are:
smb.service and nmb.service, instead of smbd.service and nmbd.service as
mentioned at the site you linked.

I can't say that surprises me; I'll have to look to Fedora some time to see if Suse is at variance or if ArchLinux is at variance. Either way, its not really significant; its not as if there is a 'standard' here.

Or maybe not
https://bugzilla.redhat.com/show_bug.cgi?id=830589


2. I could not find any *.service file containing strings 'smb' or 'nmb' on my
whole system.
(Starting search in the / directory.)

It would be, depending on distribution and release, under /etc/systemd, lib/systemd or /usr/lib/systemd. Systemd uses a couple of other suffices as well. Its all documented in the man pages.

The exception here is the 'autogenerated' units.
For example, systemd scans the /etc/fstab file to generate units to take care of mounting. You can see the result with

systemctl -a | grep mount

Similarly unless there are other specific entries, systemd supports, in its backward compatibility mode, entries from /etc/init.d that haven't been converted. This is what you are seeing. I'm sure Cristian can explain better. And yes its documented.



3. These are the results of grep and systemctl status commands:

# ps -e|grep -i smb
2893 ? 00:00:00 smbd
2946 ? 00:00:00 smbd
#
#
# ps -e|grep -i nmb
#
#
# systemctl status smb.service
smb.service - LSB: Samba SMB/CIFS file and print server
Loaded: loaded (/etc/init.d/smb)
Active: active (running) since Mon, 05 Aug 2013 14:14:41 +0200; 3min
2s ago
Process: 2856 ExecStart=/etc/init.d/smb start (code=exited,
status=0/SUCCESS)
CGroup: name=systemd:/system/smb.service
├ 2893 /usr/sbin/smbd -D -s /etc/samba/smb.conf
└ 2946 /usr/sbin/smbd -D -s /etc/samba/smb.conf

The 'loaded' line tells us a lot.
There isn't a specific smb unit, its part of the automatic generation of entries (that remain to be converted) of /etc/init.d entries which I mentioned above.

systemctl -a| grep smb


However it does give you enough information to create a a custom smb.service unit of your own in /etc/systemd/

Its not difficult and its not scary. You have plenty of other examples to show you how its done.


Aug 05 14:14:41 lnx smb[2856]: Starting Samba SMB daemon ..done
#
#
# systemctl status nmb.service
nmb.service - LSB: Samba NetBIOS naming service over IP
Loaded: loaded (/etc/init.d/nmb)
Active: failed (Result: exit-code) since Mon, 05 Aug 2013 14:14:41
+0200; 3min 7s ago
Process: 2814 ExecStart=/etc/init.d/nmb start (code=exited,
status=7/NOTRUNNING)
CGroup: name=systemd:/system/nmb.service

Same basic comments.

In this case look to the log files to see why it did not start.

Aug 05 14:14:41 lnx nmb[2814]: Starting Samba NMB daemon ..failed
#
#

4. I can start smbd manually:

# systemctl start nmb.service
#
# systemctl status nmb.service
nmb.service - LSB: Samba NetBIOS naming service over IP
Loaded: loaded (/etc/init.d/nmb)
Active: active (running) since Mon, 05 Aug 2013 15:19:58 +0200; 18s
ago
Process: 4625 ExecStart=/etc/init.d/nmb start (code=exited,
status=0/SUCCESS)
CGroup: name=systemd:/system/nmb.service
└ 4634 /usr/sbin/nmbd -D -s /etc/samba/smb.conf

So what is the difference between this and the above?
Possibly a dependency.
I've found that I've had to tweek dependencies on my systems.
I've commented on this elsewhere on this forum.

You may need something of the form

After=syslog.target network.target nmb.service winbind.service

but I'm not knowledgeable enough about Samba to be sure of the details as to which of nmbd and smbd should start first. But yes, they should most certainly be dependent on the network being up! And if you want to do any debugging you'll want syslog to be up!


Aug 05 15:19:58 lnx nmb[4625]: Starting Samba NMB daemon - Warning:
/var/run/samba/nmbd.pid exists. ..done
#

5. This is a new openSUSE 12.2 installation without any hacking.

We'll I've had to hack my system fair bit for a variety of reasons, mostly, as I say, dependencies, but also because the start-up of Postfix wasn't working the way I wanted.

Let me repeat that .... THE WAY I WANTED

The 'out of the box' experience tries to be a 'one size fits all' and we know that the reality of the world is that such is rarely the case.

So if you haven't hacked your machines you're letting someone else decide how you should be using it and its not working

THE WAY YOU WANT IT TO



All packages are installed by YaST and samba was set up and configured by YaST
as well. Should not it work out of the box?

I'm sorry, what part of the above don't you understand.
Of course it works "out of the box", the way someone else thinks it should. Almost everyone here, certainly those of us who contribute and most certainly those who contribute regularly are in the class of people who want it to work differently than 'out of the box'.

Clearly you too want it to work

THE WAY YOU WANT IT TO

and not the way it works out of the box.



This is OpenSuse, not SLED. Heck, even the Fred Sixpack Windows users that I encounter seem to hack their systems!



OBTW: Yast is *NOT* "systemd-aware". Don't expect Yast to be able to set up things to work with systemd!



Any further help, possibly specific, is appreciated.

You have enough in the above to create smb.service and nmb.service in /etc/systemd. Do check the man pages for smbd and nmbd as well as the systemd ones :-)







--
How long did the whining go on when KDE2 went on KDE3?

The only universal constant is change. If a species can not adapt it
goes extinct. That's the law of the universe, adapt or die.
-- Billie Walsh, May 18 2013
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
References