Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Samba doesn't work in new Debian

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
DBNLNX
Posts: 5
Joined: 2018-07-02 14:51

[SOLVED] Samba doesn't work in new Debian

#1 Post by DBNLNX »

Hello,
I'm newbie in linux. Installed latest Debian Desktop some days ago. Everything is ok but Samba doesn't work for me.
Installed samba via apt-get install samba-common (no errors).

If I tried apt-get install samba, I get error:
root@Debian:/home/debian# apt-get install samba
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
bind9 bind9utils ctdb ldb-tools smbldap-tools winbind ufw
The following NEW packages will be installed:
samba
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/933 kB of archives.
After this operation, 11.2 MB of additional disk space will be used.
Selecting previously unselected package samba.
(Reading database ... 145358 files and directories currently installed.)
Preparing to unpack .../samba_2%3a4.5.12+dfsg-2+deb9u2_amd64.deb ...
Unpacking samba (2:4.5.12+dfsg-2+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u3) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up samba (2:4.5.12+dfsg-2+deb9u2) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-07-02 17:51:45 CEST; 9ms ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 20080 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 20080 (code=exited, status=1/FAILURE)

Jul 02 17:51:44 Debian systemd[1]: Starting Samba SMB Daemon...
Jul 02 17:51:45 Debian systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Jul 02 17:51:45 Debian systemd[1]: Failed to start Samba SMB Daemon.
Jul 02 17:51:45 Debian systemd[1]: smbd.service: Unit entered failed state.
Jul 02 17:51:45 Debian systemd[1]: smbd.service: Failed with result 'exit-code'.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Then I edited /etc/samba/smb.conf and added:
[test]
Comment = test samba
Read Only = no
Locking = no
Browseable = yes  
Writeable = yes  
Guest = ok  
Path = /home/debian/multimedia/
If I trying to access shared folder computer shows me error about connecting problems (tried in WIN and MAC). I can ping debian without any problems.
Can anybody help me?
All I want is to access shared folder from other computers.
Thank you.

Used this tutorial:
https://www.howtoforge.com/tutorial/deb ... ba-server/



testparm /etc/samba/smb.conf
root@Debian:/home/debian# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[debian]"
set_variable_helper(no  ): value is not boolean!
Error loading services.
Last edited by DBNLNX on 2018-07-04 15:57, edited 1 time in total.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Samba doesn't work in new Debian

#2 Post by debiman »

DBNLNX wrote:Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
https://www.startpage.com/do/dsearch?qu ... +is+masked

tynman
Posts: 131
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 1 time

Re: Samba doesn't work in new Debian

#3 Post by tynman »

I installed Samba on a Debian Stretch system a few days ago. I don't recall seeing those error messages during the install - maybe I just didn't notice them. But now, when I look for a service named "samba-ad-dc.service", with,

Code: Select all

# systemctl status samba-ad-dc
it responds with:

Code: Select all

● samba-ad-dc.service
   Loaded: masked (/dev/null; bad)
   Active: inactive (dead)
Pretty much the same as what you saw during the install. So maybe this is "normal". Weird and not-really-useful, but normal.

My Samba installation is working fine, but there is no service running named samba-ad-dc. Only a service named smbd.

The instructions you link to say to modify the smb.conf file and then restart the smbd service, with

Code: Select all

# systemctl restart smbd.service
You mentioned that you updated the smb.conf file, but you didn't mention restarting the Samba service. Did you do that? (It's probably an important step. :) )

DBNLNX
Posts: 5
Joined: 2018-07-02 14:51

Re: Samba doesn't work in new Debian

#4 Post by DBNLNX »

Tried it now
debian@Debian:~$ su
Password:
root@Debian:/home/debian# systemctl status samba-ad-dc
● samba-ad-dc.service
Loaded: masked (/dev/null; bad)
Active: inactive (dead)
root@Debian:/home/debian# systemctl restart smbd.service
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
root@Debian:/home/debian#

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Samba doesn't work in new Debian

#5 Post by debiman »

DBNLNX wrote:See "systemctl status smbd.service" and "journalctl -xe" for details.

DBNLNX
Posts: 5
Joined: 2018-07-02 14:51

Re: Samba doesn't work in new Debian

#6 Post by DBNLNX »

I installed debian again because my first installation was for testing. Installed samba, works perfect now.
Thank you.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Samba doesn't work in new Debian

#7 Post by arzgi »

DBNLNX wrote:I installed debian again because my first installation was for testing. Installed samba, works perfect now.
Thank you.
That's great! Can you please edit the header of your first post of this thread, and mark it SOLVED.

DBNLNX
Posts: 5
Joined: 2018-07-02 14:51

Re: [SOLVED] Samba doesn't work in new Debian

#8 Post by DBNLNX »

edited. thank you.

Hale
Posts: 16
Joined: 2018-06-29 04:12

Re: [SOLVED] Samba doesn't work in new Debian

#9 Post by Hale »

I would recommend never use precompiled SAMBA, because in 90% cases Linux guys do not know what's important for Windows users... In most cases yo can not attach ClamAV to it, or point-n-click doesn't work, or linking to DHCP and BIND doesn't work either. Sometimes even nmbd does not resolve names, and WINS is preferred name resolution in "wild" windows networks, whatever Microsoft would lie to you about new DNS-based resolution method. You never know how that anonymous guy has assembled Samba for his personal use. I am not talking about domain administration, which is another hell.
Best way is building your samba from source by manual. And I like webmin for managing it, by the way.

Post Reply