You are not logged in.

#1 2017-02-19 11:39:24

DaveZed
Member
Registered: 2017-02-19
Posts: 6

smb dosn't start

Hello everyone, i start apologising if i don't spell right every single word because english isn't my first language
I never used samba until now, i need to install my wifi printer so i decided first to learn a bit about the service and gave it a try.
Simply doesn't even start the service

sudo netctl start smb
Job for netctl@smb.service failed because the control process exited with error code.
See "systemctl status netctl@smb.service" and "journalctl -xe" for details.

So i tried to give a look to the problem:

systemctl status netctl@smb.service
● netctl@smb.service - Networking for netctl profile smb
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2017-02-19 12:34:25 CET; 55s ago
     Docs: man:netctl.profile(5)
  Process: 1473 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
 Main PID: 1473 (code=exited, status=1/FAILURE)

feb 19 12:34:25 Archlinux systemd[1]: Starting Networking for netctl profile smb...
feb 19 12:34:25 Archlinux network[1473]: Profile 'smb' does not exist or is not readable
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Main process exited, code=exited, st
feb 19 12:34:25 Archlinux systemd[1]: Failed to start Networking for netctl profile smb.
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Unit entered failed state.
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Failed with result 'exit-code'.

I even tried to give smbd -iS

smbd -iS
Failed to create /var/log/samba/cores for user 1000 with mode 0700
Unable to setup corepath for smbd: Operazione non permessa (from italian translation:  Operation not permitted )
smbd version 4.5.4 started.
Copyright Andrew Tridgell and the Samba Team 1992-2016

My smb.conf file is just as simple:

# Global Settings
[global]
workgroup = WORKGROUP
map to guest = bad user

# Local User Share
[MyShare]
comment = Cartella condivisa
path = /home/dave/Shared
browsable = yes
writable = yes
guest ok = yes
read only = no

Can someone help?

Offline

#2 2017-02-19 12:12:01

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

Welcome to the arch linux forums DaveZed
See CUPS for configuring a printer server.

Offline

#3 2017-02-19 12:13:43

DaveZed
Member
Registered: 2017-02-19
Posts: 6

Re: smb dosn't start

Thank you loqs, i know i have to use CUPS for the printer but if samba is not working i can't use even CUPS so i need to fix that first

Offline

#4 2017-02-19 12:17:29

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

DaveZed wrote:

Thank you loqs, i know i have to use CUPS for the printer but if samba is not working i can't use even CUPS so i need to fix that first

What is your source that you need a samba server to connect to this printer?  Even if it uses the smb protocol you would just need Samba#Client_configuration
Edit:
Also why do you think Netctl is related to smb/samba?

Last edited by loqs (2017-02-19 12:22:43)

Offline

#5 2017-02-19 12:21:37

DaveZed
Member
Registered: 2017-02-19
Posts: 6

Re: smb dosn't start

Form the ArchWiki page

If the system is connected to a networked printer using the Samba protocol, or if the system is to be a print server for Windows clients, install the samba package.

And my samba is not working so i can't use my network printer

Offline

#6 2017-02-19 12:25:01

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

Installing the package is not the same as requiring the server to configured and running.
Edit:
If you want to run a samba server this is also covered on the wiki Samba

Last edited by loqs (2017-02-19 12:29:07)

Offline

#7 2017-02-19 12:39:24

DaveZed
Member
Registered: 2017-02-19
Posts: 6

Re: smb dosn't start

Excuse me but the title of my post is "SMB DOESN'T START" i know the samba wiki but i can't seem to make go and i was asking for help...

Offline

#8 2017-02-19 12:44:47

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

DaveZed wrote:

Excuse me but the title of my post is "SMB DOESN'T START" i know the samba wiki but i can't seem to make go and i was asking for help...

If you were following the samba page from the wiki why did you do this?

DaveZed wrote:
sudo netctl start smb
Job for netctl@smb.service failed because the control process exited with error code.
See "systemctl status netctl@smb.service" and "journalctl -xe" for details.

So i tried to give a look to the problem:

systemctl status netctl@smb.service
● netctl@smb.service - Networking for netctl profile smb
   Loaded: loaded (/usr/lib/systemd/system/netctl@.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2017-02-19 12:34:25 CET; 55s ago
     Docs: man:netctl.profile(5)
  Process: 1473 ExecStart=/usr/lib/network/network start %I (code=exited, status=1/FAILURE)
 Main PID: 1473 (code=exited, status=1/FAILURE)

feb 19 12:34:25 Archlinux systemd[1]: Starting Networking for netctl profile smb...
feb 19 12:34:25 Archlinux network[1473]: Profile 'smb' does not exist or is not readable
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Main process exited, code=exited, st
feb 19 12:34:25 Archlinux systemd[1]: Failed to start Networking for netctl profile smb.
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Unit entered failed state.
feb 19 12:34:25 Archlinux systemd[1]: netctl@smb.service: Failed with result 'exit-code'.

Edit:
Samba#Starting_services

To provide basic file sharing through SMB start/enable smbd.service and/or nmbd.service services. See the smbd(8) and nmbd(8) man pages for details, as the nmbd.service service may not always be required.
Tip: Instead of having the service running since boot, you can enable smbd.socket so the daemon is started on the first incoming connection. Do not forget to disable smbd.service.

Where start/enable is a link to Systemd#Using_units

Last edited by loqs (2017-02-19 12:48:35)

Offline

#9 2017-02-19 15:14:17

DaveZed
Member
Registered: 2017-02-19
Posts: 6

Re: smb dosn't start

Sorry but I'm not sure I understand where I'm going wrong. Should i use SYSTEMCTL and not netctl to start the service like this?

sudo systemctl start smbd.service
 systemctl status smbd.service
● smbd.service - Samba SMB/CIFS server
   Loaded: loaded (/usr/lib/systemd/system/smbd.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sun 2017-02-19 16:09:11 CET; 7s ago
  Process: 895 ExecStart=/usr/bin/smbd -D (code=exited, status=1/FAILURE)

feb 19 16:09:11 Archlinux systemd[1]: Starting Samba SMB/CIFS server...
feb 19 16:09:11 Archlinux systemd[1]: smbd.service: Control process exited, code=exited status
feb 19 16:09:11 Archlinux systemd[1]: Failed to start Samba SMB/CIFS server.
feb 19 16:09:11 Archlinux systemd[1]: smbd.service: Unit entered failed state.
feb 19 16:09:11 Archlinux systemd[1]: smbd.service: Failed with result 'exit-code'.

I know I'm not doing it right, but I've done it on another linux system and that one worked just fine

Offline

#10 2017-02-19 15:42:46

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

My advice is still the same what you want is to connect to the printer using smb so please put aside trying to start the samba server for now
(your method to start the service is now correct you can configure it later if it proves to be needed which I do not believe it will)
CUPS#Installation
After having enabled cups check it is running with

$ org.cups.cupsd.service

Then connect to CUPS#Web_interface and add the printer then try printing.

DaveZed wrote:

Sorry but I'm not sure I understand where I'm going wrong. Should i use SYSTEMCTL and not netctl to start the service like this?

Yes Netctl it is not used to control services.
Edit:
grammar changed "your method to start the service is now correct" from "your method is correct"

Last edited by loqs (2017-02-19 15:45:39)

Offline

#11 2017-02-20 04:44:26

HiImTye
Member
From: Halifax, NS, Canada
Registered: 2012-05-09
Posts: 1,072

Re: smb dosn't start

if you are using a wifi or changing connection, then you should use the .socket rather than the .service to stop samba from failing to load when you make new connections

Offline

#12 2017-02-20 17:11:55

DaveZed
Member
Registered: 2017-02-19
Posts: 6

Re: smb dosn't start

CUPS is working just fine, only a little issue on using localhost but i just switch to 127.0.0.1 and it all goes
Samba still is not starting, I'm getting frustrated, I need it for school.

Offline

#13 2017-02-20 17:30:14

loqs
Member
Registered: 2014-03-06
Posts: 17,327

Re: smb dosn't start

What is the output of

$ testparm /etc/samba/smb.conf

Edit:
If testparm indicates the configuration is valid then:

DaveZed wrote:

I even tried to give smbd -iS

smbd -iS
Failed to create /var/log/samba/cores for user 1000 with mode 0700
Unable to setup corepath for smbd: Operazione non permessa (from italian translation:  Operation not permitted )
smbd version 4.5.4 started.
Copyright Andrew Tridgell and the Samba Team 1992-2016

This fails because smbd was not being run as root

$ su -
# smbd -iSd 1

Last edited by loqs (2017-02-20 23:49:29)

Offline

Board footer

Powered by FluxBB