Issues related to applications and software problems
-
systemshq
- Posts: 20
- Joined: 2015/11/11 10:58:12
Post
by systemshq » 2020/05/02 21:15:08
I've just applied the latest updates to my server and now samba won't start:-
Code: Select all
[root@cleopatra samba]# systemctl status smb.service
smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sat 2020-05-02 22:02:39 BST; 5s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 27076 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=255)
Main PID: 27076 (code=exited, status=255)
May 02 22:02:38 cleopatra.grinton.net systemd[1]: Starting Samba SMB Daemon...
May 02 22:02:39 cleopatra.grinton.net smbd[27076]: [2020/05/02 22:02:39.067033, 0] ../../source3/smbd/server.c:1856(main)
May 02 22:02:39 cleopatra.grinton.net smbd[27076]: ERROR: failed to setup profiling
May 02 22:02:39 cleopatra.grinton.net systemd[1]: smb.service: main process exited, code=exited, status=255/n/a
May 02 22:02:39 cleopatra.grinton.net systemd[1]: Failed to start Samba SMB Daemon.
May 02 22:02:39 cleopatra.grinton.net systemd[1]: Unit smb.service entered failed state.
May 02 22:02:39 cleopatra.grinton.net systemd[1]: smb.service failed.
Code: Select all
# yum info samba
Loaded plugins: changelog, fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: mirrors.melbourne.co.uk
* centosplus: mirrors.melbourne.co.uk
* elrepo: mirror.koddos.net
* epel: ftp.wcss.pl
* extras: mirror.ox.ac.uk
* remi: remirepo.reloumirrors.net
* remi-php73: remirepo.reloumirrors.net
* remi-safe: remirepo.reloumirrors.net
* updates: mozart.ee.ic.ac.uk
Installed Packages
Name : samba
Arch : x86_64
Version : 4.10.4
Release : 10.el7
Size : 2.1 M
Repo : installed
From repo : base
Summary : Server and Client software to interoperate with Windows machines
URL : http://www.samba.org/
Licence : GPLv3+ and LGPLv3+
Description : Samba is the standard Windows interoperability suite of programs for Linux and
: Unix.
Using just the basic example file to test:-
Code: Select all
/etc/samba/smb.conf
# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
printing = cups
printcap name = cups
load printers = yes
cups options = raw
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @printadmin root
force group = @printadmin
create mask = 0664
directory mask = 0775
And selinux is disabled.
Any help much appreciated please.
-
jlehtone
- Posts: 4523
- Joined: 2007/12/11 08:17:33
- Location: Finland
Post
by jlehtone » 2020/05/03 10:21:32
Samba can/should write logs to: /var/log/samba/
Are there more verbose error messages?
-
systemshq
- Posts: 20
- Joined: 2015/11/11 10:58:12
Post
by systemshq » 2020/05/03 14:17:34
Unfortunately no more error messages
-
jlehtone
- Posts: 4523
- Joined: 2007/12/11 08:17:33
- Location: Finland
Post
by jlehtone » 2020/05/03 15:23:16
Increase the logging/verbosity level in
smb.conf. The try to start again.
-
systemshq
- Posts: 20
- Joined: 2015/11/11 10:58:12
Post
by systemshq » 2020/05/04 19:18:15
Code: Select all
smbd version 4.10.4 started.
Copyright Andrew Tridgell and the Samba Team 1992-2019
[2020/05/04 20:15:31.804284, 2] ../../source3/smbd/server.c:1786(main)
uid=0 gid=0 euid=0 egid=0
[2020/05/04 20:15:31.804312, 3] ../../source3/param/loadparm.c:3872(lp_load_ex)
lp_load_ex: refreshing parameters
[2020/05/04 20:15:31.804358, 3] ../../source3/param/loadparm.c:550(init_globals)
Initialising global parameters
[2020/05/04 20:15:31.804398, 2] ../../source3/param/loadparm.c:322(max_open_files)
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
[2020/05/04 20:15:31.804564, 3] ../../source3/param/loadparm.c:2786(lp_do_section)
Processing section "[global]"
[2020/05/04 20:15:31.805359, 2] ../../source3/lib/tallocmsg.c:56(register_msg_pool_usage)
Registered MSG_REQ_POOL_USAGE
[2020/05/04 20:15:31.805381, 2] ../../source3/lib/dmallocmsg.c:78(register_dmalloc_msgs)
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2020/05/04 20:15:31.805433, 3] ../../source3/param/loadparm.c:3872(lp_load_ex)
lp_load_ex: refreshing parameters
[2020/05/04 20:15:31.805480, 3] ../../source3/param/loadparm.c:550(init_globals)
Initialising global parameters
[2020/05/04 20:15:31.805501, 2] ../../source3/param/loadparm.c:322(max_open_files)
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
[2020/05/04 20:15:31.805616, 3] ../../source3/param/loadparm.c:2786(lp_do_section)
Processing section "[global]"
[2020/05/04 20:15:31.805822, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[homes]"
[2020/05/04 20:15:31.805880, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[printers]"
[2020/05/04 20:15:31.805960, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[media]"
[2020/05/04 20:15:31.806039, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[photos]"
[2020/05/04 20:15:31.806101, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[softdist]"
[2020/05/04 20:15:31.806177, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[amh]"
[2020/05/04 20:15:31.806242, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[andrew]"
[2020/05/04 20:15:31.806305, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[children]"
[2020/05/04 20:15:31.806364, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[alex]"
[2020/05/04 20:15:31.806426, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[jacob]"
[2020/05/04 20:15:31.806488, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[djh]"
[2020/05/04 20:15:31.806548, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[other]"
[2020/05/04 20:15:31.806609, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[armh]"
[2020/05/04 20:15:31.806669, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[jsfh]"
[2020/05/04 20:15:31.806731, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[family]"
[2020/05/04 20:15:31.806795, 2] ../../source3/param/loadparm.c:2803(lp_do_section)
Processing section "[testing]"
[2020/05/04 20:15:31.806891, 3] ../../source3/param/loadparm.c:1621(lp_add_ipc)
adding IPC service
[2020/05/04 20:15:31.807418, 2] ../../source3/lib/interface.c:345(add_interface)
added interface eno1 ip=192.168.1.113 bcast=192.168.1.255 netmask=255.255.255.0
[2020/05/04 20:15:31.807471, 3] ../../source3/smbd/server.c:1851(main)
loaded services
[2020/05/04 20:15:31.807552, 0] ../../source3/smbd/server.c:1856(main)
ERROR: failed to setup profiling
-
systemshq
- Posts: 20
- Joined: 2015/11/11 10:58:12
Post
by systemshq » 2020/05/04 20:21:29
samba 4.10.4 doesn't like it if your data directory is linked to another partition as I had:-
/var/lib/samba -> /mnt/drbd0/samba
Steps to solve
Code: Select all
1. systemctl stop smbd
2. rm /var/lib/samba
3. mkdir /var/lib/samba
4. rsync -av /mnt/drbd0/samba/ /var/lib/samba/
5. systemctl start smbd
and everything now works:)
-
jlehtone
- Posts: 4523
- Joined: 2007/12/11 08:17:33
- Location: Finland
Post
by jlehtone » 2020/05/04 22:41:52
An alternative to copying would have been a bind-mount.
For fstab:
Code: Select all
/mnt/drbd0/samba /var/lib/samba none defaults,bind 0 0
-
msqv
- Posts: 1
- Joined: 2020/05/06 12:40:50
Post
by msqv » 2020/05/06 12:45:31
Hi, I tried to figure what caused this problem. I searched the source code and the internet but I did not find the issue.
I found a CVE concerning symlinks CVE-2019-3880 but it seems nothing to do with the /var/lib/samba (or at least the samba state dir) to be referred by a symlink.
Any idea what the source of the problem is?
-
TrevorH
- Site Admin
- Posts: 33202
- Joined: 2009/09/24 10:40:56
- Location: Brighton, UK
Post
by TrevorH » 2020/05/06 15:11:44
The problem as described here with symlinking to /dev/drbd0 sounds like it's probably selinux related as that would deny access to locations that were not labelled correctly. And that wouldn't be.