Closed partouf closed 5 months ago
Little stuck now, built everything and installed service, but it gives a timeout without any hint of a reason why
Have tested this locally. Service actually runs fine if you run smbd manually, just when you use systemctl it does something completely different, I'm confused.
If I run smbd manually:
$ sudo /usr/local/samba/sbin/smbd -d 999999 -F --no-process-group
INFO: Current debug levels:
all: 999999
tdb: 999999
printdrivers: 999999
lanman: 999999
smb: 999999
rpc_parse: 999999
rpc_srv: 999999
rpc_cli: 999999
passdb: 999999
sam: 999999
auth: 999999
winbind: 999999
vfs: 999999
idmap: 999999
quota: 999999
acls: 999999
locking: 999999
msdfs: 999999
dmapi: 999999
registry: 999999
scavenger: 999999
dns: 999999
ldb: 999999
tevent: 999999
auth_audit: 999999
auth_json_audit: 999999
kerberos: 999999
drs_repl: 999999
smb2: 999999
smb2_credits: 999999
dsdb_audit: 999999
dsdb_json_audit: 999999
dsdb_password_audit: 999999
dsdb_password_json_audit: 999999
dsdb_transaction_audit: 999999
dsdb_transaction_json_audit: 999999
dsdb_group_audit: 999999
dsdb_group_json_audit: 999999
And when I run systemctl smb start
, it times out and then logging says:
$ sudo systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/etc/systemd/system/smb.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Sat 2023-08-12 13:59:10 CEST; 1min 9s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 304105 ExecStart=/usr/local/samba/sbin/smbd -d 99 --foreground --no-process-group $SMBDOPTIONS (code=killed, signal=TERM)
Main PID: 304105 (code=killed, signal=TERM)
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: dsdb_transaction_audit: 99
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: dsdb_transaction_json_audit: 99
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: dsdb_group_audit: 99
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: dsdb_group_json_audit: 99
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: [2023/08/12 13:57:40.044412, 0, pid=304105, effective(0, 0), real(0, 0)] ../../source3/smbd/server.c:1746(main)
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: smbd version 4.18.5 started.
aug 12 13:57:40 partouf-System-Product-Name smbd[304105]: Copyright Andrew Tridgell and the Samba Team 1992-2023
aug 12 13:59:10 partouf-System-Product-Name systemd[1]: smb.service: start operation timed out. Terminating.
aug 12 13:59:10 partouf-System-Product-Name systemd[1]: smb.service: Failed with result 'timeout'.
aug 12 13:59:10 partouf-System-Product-Name systemd[1]: Failed to start Samba SMB Daemon.
The systemctl ini file contents are:
[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 nmb.service winbind.service
[Service]
Type=notify
PIDFile=/usr/local/samba/var/run/samba/smbd.pid
LimitNOFILE=16384
EnvironmentFile=-/usr/local/samba/etc/sysconfig/samba
ExecStart=/usr/local/samba/sbin/smbd -d 99 --foreground --no-process-group $SMBDOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
LimitCORE=infinity
[Install]
WantedBy=multi-user.target
So confused...
The UB distro's don't have the right version of samba that I need, so we need to build it ourselves.
Work in progress here https://github.com/compiler-explorer/infra/blob/main/setup-smb.sh
Current issue: