Problem with samba

Kernels & Hardware, configuring network, installing services

Problem with samba

Postby cobreros » 2015-12-08 09:19

Hi everybody.
I'm becoming crazy.
I've the same problems that it's explain here:
http://aptosid.com/index.php?name=PNphp ... pic&t=2846
Can someone help me?
hank you.
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby swirly_cloud » 2015-12-08 17:04

This post might be useful: http://forums.debian.net/viewtopic.php?f=5&t=126007&p=600697&hilit=samba+masked+%2Fdev%2Fnull#p600697.

It was posted 5 days ago and seems to cover your issue. You have included almost no information, so I can't do much for you other than the above link.

To find that topic, I searched the Debian Forums for "samba masked".

Hope this helps.
User avatar
swirly_cloud
 
Posts: 69
Joined: 2015-07-08 04:56
Location: Where sun shines.

Re: Problem with samba

Postby cobreros » 2015-12-08 17:43

Thank you very much.
This post is very useful.
Now I unmask samba. I had his some problem.
Nov I restart the pc and receive this status from samba:
Code: Select all
service samba status
● samba.service - LSB: ensure Samba daemons are started (nmbd and smbd)
   Loaded: loaded (/etc/init.d/samba)
   Active: inactive (dead)

Is it ok, or have I still a problem?
Active: inactive (dead) is it correct?
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby cobreros » 2015-12-08 17:47

But if I write:
Code: Select all
service samba start

and after:
Code: Select all
service samba status

I obtain this:
Code: Select all
● samba.service - LSB: ensure Samba daemons are started (nmbd and smbd)
   Loaded: loaded (/etc/init.d/samba)
   Active: active (exited) since mar 2015-12-08 18:44:41 CET; 8s ago
  Process: 1745 ExecStart=/etc/init.d/samba start (code=exited, status=0/SUCCESS)

dic 08 18:44:41 debian samba[1745]: Starting nmbd (via systemctl): nmbd.service.
dic 08 18:44:41 debian samba[1745]: Starting smbd (via systemctl): smbd.service.
dic 08 18:44:41 debian samba[1745]: Starting samba-ad-dc (via systemctl): s...e.
Hint: Some lines were ellipsized, use -l to show in full.
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby Head_on_a_Stick » 2015-12-08 19:00

I think it's fine -- the .service just starts the daemons and if they're already running it will have no effect,

Just to be sure, please post the output of:
Code: Select all
systemctl --all|egrep 'samba|smbd|nmbd'
ls -l /etc/systemd/system/multi-user.target.wants
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12622
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem with samba

Postby swirly_cloud » 2015-12-08 19:03

cobreros wrote:But if I write:
Code: Select all
service samba start

and after:
Code: Select all
service samba status

I obtain this:
Code: Select all
● samba.service - LSB: ensure Samba daemons are started (nmbd and smbd)
   Loaded: loaded (/etc/init.d/samba)
   Active: active (exited) since mar 2015-12-08 18:44:41 CET; 8s ago
  Process: 1745 ExecStart=/etc/init.d/samba start (code=exited, status=0/SUCCESS)

dic 08 18:44:41 debian samba[1745]: Starting nmbd (via systemctl): nmbd.service.
dic 08 18:44:41 debian samba[1745]: Starting smbd (via systemctl): smbd.service.
dic 08 18:44:41 debian samba[1745]: Starting samba-ad-dc (via systemctl): s...e.
Hint: Some lines were ellipsized, use -l to show in full.


Hmm, I am not entirely certain about the correctness of the procedure in that post that I linked previously. I think the samba.service unit is meant to be masked by default. The system administrator is supposed to manage the smbd.service and nmbd.service units.

I am going to try to corroborate these arguments with some documentation. I cannot recall how I have setup my samba servers in Jessie, since they have never failed since.
User avatar
swirly_cloud
 
Posts: 69
Joined: 2015-07-08 04:56
Location: Where sun shines.

Re: Problem with samba

Postby cobreros » 2015-12-08 19:04

massimo@debian:~$ systemctl --all|egrep 'samba|smbd|nmbd'
nmbd.service loaded active running LSB: start Samba NetBIOS nameserver (nmbd)
samba-ad-dc.service loaded active exited LSB: start Samba daemons for the AD DC
samba.service loaded active exited LSB: ensure Samba daemons are started (nmbd and smbd)
smbd.service loaded active running LSB: start Samba SMB/CIFS daemon (smbd)
massimo@debian:~$ ls -l /etc/systemd/system/multi-user.target.wants
totale 0
lrwxrwxrwx 1 root root 35 nov 15 01:33 anacron.service -> /lib/systemd/system/anacron.service
lrwxrwxrwx 1 root root 31 nov 15 01:33 atd.service -> /lib/systemd/system/atd.service
lrwxrwxrwx 1 root root 40 nov 15 01:33 avahi-daemon.service -> /lib/systemd/system/avahi-daemon.service
lrwxrwxrwx 1 root root 32 nov 15 01:12 cron.service -> /lib/systemd/system/cron.service
lrwxrwxrwx 1 root root 40 nov 15 01:34 cups-browsed.service -> /lib/systemd/system/cups-browsed.service
lrwxrwxrwx 1 root root 40 nov 15 01:34 ModemManager.service -> /lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 42 nov 15 01:34 NetworkManager.service -> /lib/systemd/system/NetworkManager.service
lrwxrwxrwx 1 root root 36 nov 15 01:34 pppd-dns.service -> /lib/systemd/system/pppd-dns.service
lrwxrwxrwx 1 root root 36 nov 15 01:11 remote-fs.target -> /lib/systemd/system/remote-fs.target
lrwxrwxrwx 1 root root 35 nov 15 01:12 rsyslog.service -> /lib/systemd/system/rsyslog.service
lrwxrwxrwx 1 root root 49 nov 27 15:47 vboxautostart-service.service -> /lib/systemd/system/vboxautostart-service.service
lrwxrwxrwx 1 root root 51 nov 27 15:47 vboxballoonctrl-service.service -> /lib/systemd/system/vboxballoonctrl-service.service
lrwxrwxrwx 1 root root 35 nov 27 15:47 vboxdrv.service -> /lib/systemd/system/vboxdrv.service
lrwxrwxrwx 1 root root 43 nov 27 15:47 vboxweb-service.service -> /lib/systemd/system/vboxweb-service.service
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby Head_on_a_Stick » 2015-12-08 19:26

swirly_cloud wrote:Hmm, I am not entirely certain about the correctness of the procedure in that post that I linked previously. I think the samba.service unit is meant to be masked by default. The system administrator is supposed to manage the smbd.service and nmbd.service units

You could be right there, I've never used Samba :D

The ArchWiki page states that smbd & nmbd should be enabled but doesn't mention "samba.service"
https://wiki.archlinux.org/index.php/Sa ... g_services
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12622
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem with samba

Postby cobreros » 2015-12-08 19:29

Head_on_a_Stick wrote:
swirly_cloud wrote:Hmm, I am not entirely certain about the correctness of the procedure in that post that I linked previously. I think the samba.service unit is meant to be masked by default. The system administrator is supposed to manage the smbd.service and nmbd.service units

You could be right there, I've never used Samba :D

The ArchWiki page states that smbd & nmbd should be enabled but doesn't mention "samba.service"
https://wiki.archlinux.org/index.php/Sa ... g_services


Is it good the output I wrote?
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby swirly_cloud » 2015-12-08 19:34

If I recall correctly, I was doing some research before setting up my samba servers. In this research I cam across Arch Wiki's respective page on Samba: https://wiki.archlinux.org/index.php/Samba#Starting_services.
Note: I have found no corroboration for this in the smbd, nmbd, samba and smb.conf man pages.

I have also come across two relevant bug reports. The package maintainer also mentions that using smbd and nmbd is more appropriate.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769714
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740942

Lastly, I have just found this Wiki discussion page: https://wiki.debian.org/systemd/EnableDiscussion

EDIT:
This has come up in the samba package change log. The following is an excerpt of /usr/share/doc/samba/changelog.Debian.gz
samba (2:4.1.13+dfsg-2) unstable; urgency=medium

* Mask /etc/init.d/samba init script for systemd. This should make systemd
ignore the samba init script. Thanks to Michael Biebl for the suggestion.
Closes: #740942
* Disable samba init script on upgrade from wheezy to jessie.
Thanks again to Michael Biebl for the report.
Closes: #766690

-- Ivo De Decker <ivodd@debian.org> Sat, 25 Oct 2014 00:49:12 +0200


The samba-doc package does not seem add anything in this regard.

This service management issue does not seem very documented under systemd and Debian.
Last edited by swirly_cloud on 2015-12-08 20:11, edited 1 time in total.
User avatar
swirly_cloud
 
Posts: 69
Joined: 2015-07-08 04:56
Location: Where sun shines.

Re: Problem with samba

Postby swirly_cloud » 2015-12-08 19:38

cobreros wrote:
Head_on_a_Stick wrote:
swirly_cloud wrote:Hmm, I am not entirely certain about the correctness of the procedure in that post that I linked previously. I think the samba.service unit is meant to be masked by default. The system administrator is supposed to manage the smbd.service and nmbd.service units

You could be right there, I've never used Samba :D

The ArchWiki page states that smbd & nmbd should be enabled but doesn't mention "samba.service"
https://wiki.archlinux.org/index.php/Sa ... g_services


Is it good the output I wrote?


Even if the server is running and is in a usable state, I think that you should still do as the maintainer recommends and use smbd.service and nmbd.service instead. Of course, samba.service should be masked again. You can use the sysmctl command for this.
User avatar
swirly_cloud
 
Posts: 69
Joined: 2015-07-08 04:56
Location: Where sun shines.

Re: Problem with samba

Postby cobreros » 2015-12-08 19:48

swirly_cloud wrote:Even if the server is running and is in a usable state, I think that you should still do as the maintainer recommends and use smbd.service and nmbd.service instead. Of course, samba.service should be masked again. You can use the sysmctl command for this.


I don't know how to do.
I hope it will work good in future.
I want to create a small domestic network.
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby Head_on_a_Stick » 2015-12-08 19:50

cobreros wrote:I don't know how to do

Code: Select all
# systemctl mask samba
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 12622
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Problem with samba

Postby cobreros » 2015-12-08 21:45

Head_on_a_Stick wrote:
cobreros wrote:I don't know how to do

Code: Select all
# systemctl mask samba


If I give this comand, will it mask samba again?
In that case, how can unmask it?
Sorry if it's a stupid question, but I don't want to make errors and ask always help
cobreros
 
Posts: 11
Joined: 2015-12-08 09:13

Re: Problem with samba

Postby swirly_cloud » 2015-12-08 23:02

cobreros wrote:
Head_on_a_Stick wrote:
cobreros wrote:I don't know how to do

Code: Select all
# systemctl mask samba


If I give this comand, will it mask samba again?
In that case, how can unmask it?
Sorry if it's a stupid question, but I don't want to make errors and ask always help


As the package maintainer said, samba.service is supposed to be masked. Whatever modification you want to do to the samba service (restart, stop, check status, enable, disable, ...) you do through smbd and nmbd. To check the status of the server do:
$ systemctl status smbd
User avatar
swirly_cloud
 
Posts: 69
Joined: 2015-07-08 04:56
Location: Where sun shines.

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 12 guests

fashionable