Marco_PITS
Anmeldungsdatum: 29. Dezember 2022
Beiträge: Zähle...
|
Guten Tag zusammen, ich habe folgendes Problem als ich Samba installiert und konfiguriert habe kam der Fehler auf, der bereits unter Samba startet nach Installation nicht. bearbeitet wurde.
Allerdings kam nach der Durchführung dieser Schritte folgende Fehlermeldung auf beim Befehl "systemctl status smbd.service
"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 | root@apollo:~# systemctl status smbd.service
Warning: The unit file, source configuration file or drop-ins of smbd.service changed on disk. Run 'systemctl daemon-reload' to reload units.
× smbd.service
Loaded: bad-setting (Reason: Unit smbd.service has a bad unit file setting.)
Drop-In: /etc/systemd/system/smbd.service.d
└─override.conf
Active: failed (Result: exit-code) since Thu 2022-12-29 11:12:39 UTC; 15min ago
Main PID: 29591 (code=exited, status=1/FAILURE)
CPU: 44ms
Dez 29 11:17:49 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
Dez 29 11:23:23 apollo systemd[1]: /etc/systemd/system/smbd.service:9: Assignment outside of section. Ignoring.
Dez 29 11:23:23 apollo systemd[1]: /etc/systemd/system/smbd.service:10: Assignment outside of section. Ignoring.
Dez 29 11:23:23 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:1: Assignment outside of section. Ignoring.
Dez 29 11:23:23 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
Dez 29 11:23:23 apollo systemd[1]: smbd.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service:9: Assignment outside of section. Ignoring.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service:10: Assignment outside of section. Ignoring.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:1: Assignment outside of section. Ignoring.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
root@apollo:~#
|
In der Fehlermeldung wird beschrieben, dass man systemctl daemon-reload ausführen, das habe ich getan aber es hat sich nicht verändert.
Meine smb.conf sieht folgendermaßen aus:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236 | #======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)
#### Networking ####
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = yes
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
logging = file
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
logging = file
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller".
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
server role = standalone server
obey pam restrictions = yes
# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
unix password sync = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes
# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user
########## Domains ###########
#
# The following settings only takes effect if 'server role = classic
# primary domain controller', 'server role = classic backup domain controller'
# or 'domain logons' is set
#
# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
# logon path = \\%N\%U\profile
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
# logon home = \\%N\%U
# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd
# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u
# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.
# The following assumes a "machines" group exists on the system
; add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.
; add group script = /usr/sbin/addgroup --force-badname %g
############ Misc ############
# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m
# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap config * : backend = tdb
; idmap config * : range = 3000-7999
; idmap config YOURDOMAINHERE : backend = tdb
; idmap config YOURDOMAINHERE : range = 100000-999999
; template shell = /bin/bash
# Setup usershare options to enable non-root users to share folders
# with the net usershare command.
# Maximum number of usershare. 0 means that usershare is disabled.
# usershare max shares = 100
# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
#======================= Share Definitions =======================
# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no
# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
; read only = yes
# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700
# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
; valid users = %S
# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; read only = yes
# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
; write list = root, @lpadmin
|
Wenn ich Testparm durchführe kommt folgende Ausgabe:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | root@apollo:~# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed
WARNING: state directory /var/lib/samba should have permissions 0755 for browsing to work
WARNING: cache directory /var/cache/samba should have permissions 0755 for browsing to work
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
server role = standalone server
server string = %h server (Samba, Ubuntu)
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb
[printers]
browseable = No
comment = All Printers
create mask = 0700
path = /var/spool/samba
printable = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
root@apollo:~#
|
Den Service neu zu starten habe ich ebenfalls ausprobiert:
| root@apollo:~# sudo systemctl restart smbd.service
Failed to restart smbd.service: Unit smbd.service has a bad unit file setting.
See system logs and 'systemctl status smbd.service' for details.
|
Die ausgabe von "journalctl -xe" ergibt das hier: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 | root@apollo:~# journalctl -xe
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service:10: Assignment outside of section. Ignoring.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:1: Assignment outside of section. Ignoring.
Dez 29 11:23:47 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
Dez 29 11:39:01 apollo CRON[31435]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Dez 29 11:39:01 apollo CRON[31436]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Dez 29 11:39:01 apollo CRON[31435]: pam_unix(cron:session): session closed for user root
Dez 29 11:39:04 apollo systemd[1]: Starting Clean php session files...
░░ Subject: A start job for unit phpsessionclean.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit phpsessionclean.service has begun execution.
░░
░░ The job identifier is 12030.
Dez 29 11:39:04 apollo systemd[1]: phpsessionclean.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit phpsessionclean.service has successfully entered the 'dead' state.
Dez 29 11:39:04 apollo systemd[1]: Finished Clean php session files.
░░ Subject: A start job for unit phpsessionclean.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit phpsessionclean.service has finished successfully.
░░
░░ The job identifier is 12030.
Dez 29 11:44:40 apollo systemd[1]: Reloading.
Dez 29 11:44:40 apollo systemd[1]: /etc/systemd/system/smbd.service:9: Assignment outside of section. Ignoring.
Dez 29 11:44:40 apollo systemd[1]: /etc/systemd/system/smbd.service:10: Assignment outside of section. Ignoring.
Dez 29 11:44:40 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:1: Assignment outside of section. Ignoring.
Dez 29 11:44:40 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
Dez 29 11:44:40 apollo systemd[1]: smbd.service: Service has no ExecStart=, ExecStop=, or SuccessAction=. Refusing.
Dez 29 11:44:44 apollo systemd[1]: /etc/systemd/system/smbd.service:9: Assignment outside of section. Ignoring.
Dez 29 11:44:44 apollo systemd[1]: /etc/systemd/system/smbd.service:10: Assignment outside of section. Ignoring.
Dez 29 11:44:44 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:1: Assignment outside of section. Ignoring.
Dez 29 11:44:44 apollo systemd[1]: /etc/systemd/system/smbd.service.d/override.conf:2: Assignment outside of section. Ignoring.
Dez 29 12:08:15 apollo sudo[31548]: root : TTY=pts/1 ; PWD=/root ; USER=root ; COMMAND=/usr/bin/systemctl restart smbd.service
Dez 29 12:08:15 apollo sudo[31548]: pam_unix(sudo:session): session opened for user root(uid=0) by marco(uid=0)
Dez 29 12:08:15 apollo sudo[31548]: pam_unix(sudo:session): session closed for user root
Dez 29 12:09:01 apollo CRON[31556]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
Dez 29 12:09:01 apollo CRON[31557]: (root) CMD ( [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php/sessionclean; fi)
Dez 29 12:09:01 apollo CRON[31556]: pam_unix(cron:session): session closed for user root
Dez 29 12:09:04 apollo systemd[1]: Starting Clean php session files...
░░ Subject: A start job for unit phpsessionclean.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit phpsessionclean.service has begun execution.
░░
░░ The job identifier is 12138.
Dez 29 12:09:04 apollo systemd[1]: phpsessionclean.service: Deactivated successfully.
░░ Subject: Unit succeeded
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit phpsessionclean.service has successfully entered the 'dead' state.
Dez 29 12:09:04 apollo systemd[1]: Finished Clean php session files.
░░ Subject: A start job for unit phpsessionclean.service has finished successfully
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit phpsessionclean.service has finished successfully.
░░
░░ The job identifier is 12138.
|
Ich habe jetzt mal alles ausgeführt, was mir so einfällt.
Ich würde mich sehr freuen wenn es sich jemand anschauen könnte.
Vielen Dank.
|
kB
Supporter, Wikiteam
Anmeldungsdatum: 4. Oktober 2007
Beiträge: 7816
|
Das hat wohl erst einmal gar nichts mit Samba selbst zu tun. Die Systemd-Unit für Samba ist fehlerhaft, somit kann das Programm nicht gestartet werden.
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
Hallo, zeige mal bitte die Ausgabe von
sudo systemctl cat smbd.service bzw. vergleiche deren Inhalt mit der folgenden smbd.service, die von einem frisch installiertem Jammy stammt: # /lib/systemd/system/smbd.service
[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
Wants=network-online.target
After=network.target network-online.target nmbd.service winbind.service
[Service]
Type=notify
PIDFile=/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
Die Pfad sollte normalerweise auf /lib/systemd/system/smbd.service zeigen und nicht auf /etc/systemd/system/smbd.service. LG,
Newubunti
|
Marco_PITS
(Themenstarter)
Anmeldungsdatum: 29. Dezember 2022
Beiträge: 6
|
Hi, folgendes ist die Ausgabe
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38 | root@apollo:~# sudo systemctl cat smbd.service
# Warning: smbd.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
# /etc/systemd/system/smbd.service
### Editing /etc/systemd/system/smbd.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
### Lines below this comment will be discarded
### /lib/systemd/system/smbd.service
# [Unit]
# Description=Samba SMB Daemon
# Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
# Wants=network-online.target
# After=network.target network-online.target nmbd.service winbind.service
#
# [Service]
# Type=notify
# PIDFile=/run/samba/smbd.pid
# LimitNOFILE=16384
# EnvironmentFile=-/etc/default/samba
# ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
# ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
# ExecReload=/bin/kill -HUP $MAINPID
# LimitCORE=infinity
#
#
# [Install]
# WantedBy=multi-user.target
# /etc/systemd/system/smbd.service.d/override.conf
After=network.target
Wants=network-online.target
|
Mir ist aufgefallen, dass am Ende von override.conf die Rede ist, besteht damit ein Zusammenhang oder bin ich falsch ? LG, Marco
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
Hallo, zeige mal bitte noch sudo cat /lib/systemd/system/smbd.service LG,
Newubunti
|
Marco_PITS
(Themenstarter)
Anmeldungsdatum: 29. Dezember 2022
Beiträge: 6
|
Hallo, die Ausgabe ist wie folgt: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 | [Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
Wants=network-online.target
After=network.target network-online.target nmbd.service winbind.service
[Service]
Type=notify
PIDFile=/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
root@apollo:~#
root@apollo:~# sudo cat /lib/systemd/system/smbd.service
[Unit]
Description=Samba SMB Daemon
Documentation=man:smbd(8) man:samba(7) man:smb.conf(5)
Wants=network-online.target
After=network.target network-online.target nmbd.service winbind.service
[Service]
Type=notify
PIDFile=/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/etc/default/samba
ExecStartPre=/usr/share/samba/update-apparmor-samba-profile
ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
|
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
OK, die sieht schon mal normal aus. Dann schauen wir mal noch, was bei Dir noch in /etc/systemd/system alles so herumliegt. Bitte zeige mal noch: ls -la /etc/systemd/system Das System stört sich im Moment auf jeden Fall an den smbd-Units in /etc/systemd/system. Bevor Du das alles löschst, sollte man aber erst mal schauen, was da alles drin steht. Nachdem das getan ist, würde ich alles was bezüglich smbd.service unter /etc/systemd/system liegt löschen bzw. besser erst mal umbenennen. Ich bin mir ziemlich sicher, dass smbd laufen wird, sobald da in /etc/systemd/system nichts mehr dazwischen funkt. LG,
Newubunti
|
Marco_PITS
(Themenstarter)
Anmeldungsdatum: 29. Dezember 2022
Beiträge: 6
|
Guten Abend, der Befehl ls -la /etc/systemd/system gibt folgendes aus:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48 | marco@apollo:~$ ls -la /etc/systemd/system
total 136
drwxr-xr-x 23 root root 4096 Dez 30 11:00 .
drwxr-xr-x 5 root root 4096 Dez 27 23:27 ..
drwxr-xr-x 2 root root 4096 Aug 9 11:56 cloud-final.service.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:57 cloud-init.target.wants
lrwxrwxrwx 1 root root 42 Dez 27 11:17 dbus-fi.w1.wpa_supplicant1.service -> /lib/systemd/system/wpa_supplicant.service
lrwxrwxrwx 1 root root 40 Aug 9 11:58 dbus-org.freedesktop.ModemManager1.service -> /lib/systemd/system/ModemManager.service
lrwxrwxrwx 1 root root 44 Aug 9 11:56 dbus-org.freedesktop.resolve1.service -> /lib/systemd/system/systemd-resolved.service
lrwxrwxrwx 1 root root 36 Dez 27 11:16 dbus-org.freedesktop.thermald.service -> /lib/systemd/system/thermald.service
lrwxrwxrwx 1 root root 45 Aug 9 11:56 dbus-org.freedesktop.timesync1.service -> /lib/systemd/system/systemd-timesyncd.service
drwxr-xr-x 2 root root 4096 Dez 28 09:57 default.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:57 display-manager.service.wants
drwxr-xr-x 2 root root 4096 Dez 27 11:16 emergency.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:56 final.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:56 getty.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:58 graphical.target.wants
lrwxrwxrwx 1 root root 38 Aug 9 11:56 iscsi.service -> /lib/systemd/system/open-iscsi.service
drwxr-xr-x 2 root root 4096 Aug 9 11:56 mdmonitor.service.wants
lrwxrwxrwx 1 root root 38 Aug 9 11:57 multipath-tools.service -> /lib/systemd/system/multipathd.service
drwxr-xr-x 2 root root 4096 Dez 29 11:17 multi-user.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:57 network-online.target.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:57 oem-config.service.wants
drwxr-xr-x 2 root root 4096 Aug 9 11:58 open-vm-tools.service.requires
drwxr-xr-x 2 root root 4096 Aug 9 11:57 paths.target.wants
drwxr-xr-x 2 root root 4096 Dez 27 11:16 rescue.target.wants
lrwxrwxrwx 1 root root 9 Dez 29 11:17 samba-ad-dc.service -> /dev/null
drwxr-xr-x 2 root root 4096 Dez 27 11:16 sleep.target.wants
-rw-r--r-- 1 root root 795 Dez 30 11:00 smbd.service
drwxr-xr-x 2 root root 4096 Dez 30 09:57 smbd.service.d
-rw-r--r-- 1 root root 300 Dez 27 22:08 snap-core20-1738.mount
-rw-r--r-- 1 root root 300 Dez 28 09:57 snap-core20-1778.mount
-rw-r--r-- 1 root root 294 Aug 9 11:58 snap-lxd-22923.mount
-rw-r--r-- 1 root root 294 Dez 27 22:09 snap-lxd-23541.mount
-rw-r--r-- 1 root root 467 Dez 27 22:09 snap.lxd.activate.service
-rw-r--r-- 1 root root 541 Dez 27 22:09 snap.lxd.daemon.service
-rw-r--r-- 1 root root 330 Dez 27 22:09 snap.lxd.daemon.unix.socket
-rw-r--r-- 1 root root 446 Dez 27 22:09 snap.lxd.user-daemon.service
-rw-r--r-- 1 root root 345 Dez 27 22:09 snap.lxd.user-daemon.unix.socket
-rw-r--r-- 1 root root 300 Dez 27 22:08 snap-snapd-17883.mount
drwxr-xr-x 2 root root 4096 Dez 27 22:09 sockets.target.wants
drwxr-xr-x 2 root root 4096 Dez 27 11:51 sshd-keygen@.service.d
lrwxrwxrwx 1 root root 31 Aug 9 11:56 sshd.service -> /lib/systemd/system/ssh.service
lrwxrwxrwx 1 root root 9 Aug 9 11:56 sudo.service -> /dev/null
drwxr-xr-x 2 root root 4096 Aug 9 11:57 sysinit.target.wants
lrwxrwxrwx 1 root root 35 Aug 9 11:58 syslog.service -> /lib/systemd/system/rsyslog.service
drwxr-xr-x 2 root root 4096 Dez 28 20:46 timers.target.wants
lrwxrwxrwx 1 root root 41 Aug 9 11:58 vmtoolsd.service -> /lib/systemd/system/open-vm-tools.service
|
Soll ich dann also mal die Dateien zu Samba gehören umbenennen und eine neue smbd.service einfügen ? LG
Marco
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
Marco_PITS schrieb: Soll ich dann also mal die Dateien zu Samba gehören umbenennen und eine neue smbd.service einfügen ? LG
Marco
Hallo Marco, benenne bitte die Datei /etc/systemd/system/smbd.service und das Verzeichnis /etc/systeemd/system/smbd.service.d um - z.B. mit einem .disabled am Ende. Anschließend führst Du folgenden Befehl aus:
sudo systemctl daemon-reload aus. Und anschließend einfach den smbd.service starten, mittels, sudo systemctl start smbd.service Dabei wird er dann auf die Default smbd-Unit aus /lib/systemd/system/ zugreifen und der Service sollte starten. LG,
Newubunti
|
Marco_PITS
(Themenstarter)
Anmeldungsdatum: 29. Dezember 2022
Beiträge: 6
|
Hallo, nun ist der Fehler mit der smbd.service weg, jedoch hat sich ein neuer aufgetan. Nachdem ich den Service starten wollte, kam folgender Fehler:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 | root@apollo:~# sudo systemctl start smbd.service
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xeu smbd.service" for details.
root@apollo:~# systemctl status smbd.service
× smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2022-12-31 10:18:11 UTC; 8min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Main PID: 40185 (code=exited, status=1/FAILURE)
CPU: 46ms
Dez 31 10:18:11 apollo systemd[1]: Starting Samba SMB Daemon...
Dez 31 10:18:11 apollo systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Dez 31 10:18:11 apollo systemd[1]: smbd.service: Failed with result 'exit-code'.
Dez 31 10:18:11 apollo systemd[1]: Failed to start Samba SMB Daemon.
|
Das Journal zeigt dazu folgendes: 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60 | Dez 31 10:13:47 apollo systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smbd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has begun execution.
░░
░░ The job identifier is 25862.
Dez 31 10:13:47 apollo systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit smbd.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Dez 31 10:13:47 apollo systemd[1]: smbd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit smbd.service has entered the 'failed' state with result 'exit-code'.
Dez 31 10:13:47 apollo systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smbd.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has finished with a failure.
░░
░░ The job identifier is 25862 and the job result is failed.
Dez 31 10:18:11 apollo systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smbd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has begun execution.
░░
░░ The job identifier is 26185.
Dez 31 10:18:11 apollo systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit smbd.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Dez 31 10:18:11 apollo systemd[1]: smbd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit smbd.service has entered the 'failed' state with result 'exit-code'.
Dez 31 10:18:11 apollo systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smbd.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has finished with a failure.
░░
░░ The job identifier is 26185 and the job result is failed.
|
Woran könnte es jetzt noch liegen ? LG, Marco
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
Frohes Neues! Steht etwas in den Log-Files in /var/log/samba? Oben bei testparm stand auch noch etwas von Zugriffsrechten bezüglich /var/lib/samba und /var/cache/samba. Ansonsten müsste man auch noch etwas mehr über Dein aktuelles Setup wissen. LG,
Newubunti
|
Marco_PITS
(Themenstarter)
Anmeldungsdatum: 29. Dezember 2022
Beiträge: 6
|
Hallo , erstmal ein Frohes Neues ! Leider ist am Silvesterabend der graue Kasten der Telekom abgebrannt, sodass ich ohne Internet war, was zu meiner Abwesenheit führte..
Jetzt bin ich wieder online. In der /var/log/samba/log.samba-bgqd steht folgendes:
| [2022/12/28 11:08:44, 0] ../../lib/util/become_daemon.c:150(daemon_status)
daemon_status: daemon 'samba-bgqd' : Starting process ...
|
In der /var/log/samba/log.smbd taucht auf:
| Can't load /etc/samba/smb.conf - run testparm to debug it
smbd - Failed to load config file!
|
In der log.smbd.1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63 | [2022/12/28 11:08:44.774496, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/28 12:02:53, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/28 12:02:53, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/28 12:02:53, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
Unable to setup corepath for smbd: File exists
[2022/12/28 12:02:53.438683, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/28 12:02:53.440031, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0760 should be 0700
[2022/12/28 12:13:02, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/28 12:13:02, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/28 12:13:02, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
Unable to setup corepath for smbd: File exists
[2022/12/28 12:13:02.617613, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/28 12:13:02.619145, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0760 should be 0700
[2022/12/29 10:26:51, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/29 10:26:51, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/29 10:26:51, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
Unable to setup corepath for smbd: File exists
[2022/12/29 10:26:51.814179, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/29 10:26:51.814254, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0760 should be 0700
[2022/12/29 10:30:51, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/29 10:30:51, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/29 10:30:51, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
Unable to setup corepath for smbd: File exists
[2022/12/29 10:30:51.803046, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/29 10:30:51.803115, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0760 should be 0700
[2022/12/29 10:35:58, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/29 10:35:58, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/29 10:35:58, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
Unable to setup corepath for smbd: File exists
[2022/12/29 10:35:58.075750, 0] ../../source3/smbd/server.c:1734(main)
smbd version 4.15.9-Ubuntu started.
Copyright Andrew Tridgell and the Samba Team 1992-2021
[2022/12/29 10:35:58.075825, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0760 should be 0700
[2022/12/29 10:46:05, 0] ../../lib/util/util.c:336(directory_create_or_exist_strict)
invalid permissions on directory '/var/log/samba/cores': has 0760 should be 0700
[2022/12/29 10:46:05, 0] ../../source3/lib/dumpcore.c:59(get_default_corepath)
Failed to create /var/log/samba/cores for user 0 with mode 0700
[2022/12/29 10:46:05, 0] ../../source3/lib/dumpcore.c:256(dump_core_setup)
|
Testparm gibt mittlerweile folgendes aus:
| root@apollo:/etc/samba# testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
|
Das Journal zeigt scheinbar immer noch etwas mit der smbd.service an:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67 | root@apollo:/etc/samba# journalctl -xeu smbd.service
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has finished with a failure.
░░
░░ The job identifier is 63784 and the job result is failed.
Jan 06 12:31:26 apollo systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smbd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has begun execution.
░░
░░ The job identifier is 69253.
Jan 06 12:31:26 apollo systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit smbd.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jan 06 12:31:26 apollo systemd[1]: smbd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit smbd.service has entered the 'failed' state with result 'exit-code'.
Jan 06 12:31:26 apollo systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smbd.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has finished with a failure.
░░
░░ The job identifier is 69253 and the job result is failed.
Jan 06 12:32:38 apollo systemd[1]: Starting Samba SMB Daemon...
░░ Subject: A start job for unit smbd.service has begun execution
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has begun execution.
░░
░░ The job identifier is 69361.
Jan 06 12:32:38 apollo systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit smbd.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jan 06 12:32:38 apollo systemd[1]: smbd.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit smbd.service has entered the 'failed' state with result 'exit-code'.
Jan 06 12:32:38 apollo systemd[1]: Failed to start Samba SMB Daemon.
░░ Subject: A start job for unit smbd.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit smbd.service has finished with a failure.
░░
░░ The job identifier is 69361 and the job result is failed.
|
systemctl status smbd.service gibt aus:
| root@apollo:/etc/samba# systemctl status smbd.service
× smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2023-01-06 12:32:38 UTC; 8min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 61503 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
Process: 61512 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 61512 (code=exited, status=1/FAILURE)
CPU: 68ms
|
Könnte es nützlich sein, Samba einmal komplett zu löschen und dann nochmal "sauber" installieren ? Ich weiß da leider mittlerweile nicht mehr weiter, hast Du noch eine Idee ? LG, Marco
|
Newubunti
Anmeldungsdatum: 16. Februar 2008
Beiträge: 4768
|
Hallo und ebenfalls Frohes Neues! was ergibt denn bei Dir die Ausgabe von sudo ls -la /var/lib/samba /var/cache/samba/ Unter Jammy sollte das standardmäßig folgendes zurückgeben: /var/cache/samba/:
insgesamt 16
drwxr-xr-x 3 root root 4096 Jan 6 14:11 .
drwxr-xr-x 19 root root 4096 Dez 12 23:46 ..
-rw-r--r-- 1 root root 159 Jan 6 14:11 browse.dat
drwxr-xr-x 2 root root 4096 Dez 12 23:45 printing
/var/lib/samba:
insgesamt 1368
drwxr-xr-x 6 root root 4096 Dez 12 23:45 .
drwxr-xr-x 69 root root 4096 Dez 12 23:46 ..
-rw------- 1 root root 421888 Dez 12 23:45 account_policy.tdb
drwxr-xr-x 4 root root 4096 Dez 12 23:45 DriverStore
-rw------- 1 root root 696 Dez 12 23:45 group_mapping.tdb
drwxr-xr-x 12 root root 4096 Dez 12 23:45 printers
drwxr-xr-x 3 root root 4096 Dez 12 23:45 private
-rw------- 1 root root 528384 Dez 12 23:45 registry.tdb
-rw------- 1 root root 421888 Dez 12 23:45 share_info.tdb
drwxrwx--T 2 root sambashare 4096 Dez 12 23:43 usershares
Ohne die richtigen Rechte auf diese Verzeichnisse wird der Service nicht starten können. LG,
Newubunti
|