F5F Stay Refreshed Software Operating Systems Samba build from source on Rocky Linux 9.5 problems beginning with systemd

Samba build from source on Rocky Linux 9.5 problems beginning with systemd

Samba build from source on Rocky Linux 9.5 problems beginning with systemd

B
Bartekdwarf
Posting Freak
791
09-15-2025, 08:18 PM
#1
Hello all, I have successfully built from source the latest SAMBA 4 to act as a domain controller on Rocky Linux 9.5 but when systemd goes to start the service I get: Jan 20 21:10:17 dc01 systemd[1]: Failed to start Samba Active Directory Domain Controller. Jan 20 21:13:04 dc01 systemd[47659]: samba-ad-dc.service: Failed at step EXEC spawning /usr/local/samba/sbin/samba: Permission denied I thought to myself that it is clearly permissions related,so I created a user account with 'useradd -r -M samba' and then in the systemd service file I set the user to samba: [Unit] Description=Samba Active Directory Domain Controller After=network.target remote-fs.target nss-lookup.target [Service] Type=forking User=samba ExecStart=/usr/local/samba/sbin/samba -D PIDFile=/usr/local/samba/var/run/samba.pid ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target I then thought to myself that the path having problems is /usr/local/samba/sbin/samba so I set samba to be the owner and gave this user full read write execute permissions with: sudo chown -R sambaConfusedamba /usr/local/samba/sbin/samba sudo chmod -R 744 /usr/local/samba/sbin/samba Yet I still get the same permissions issues, it mentions 'failed at step exec spawning' is there some way I can allow the samba system user account to spawn processes or is there a step I have missed here in the systemd service file or something I have done plain wrong?
B
Bartekdwarf
09-15-2025, 08:18 PM #1

Hello all, I have successfully built from source the latest SAMBA 4 to act as a domain controller on Rocky Linux 9.5 but when systemd goes to start the service I get: Jan 20 21:10:17 dc01 systemd[1]: Failed to start Samba Active Directory Domain Controller. Jan 20 21:13:04 dc01 systemd[47659]: samba-ad-dc.service: Failed at step EXEC spawning /usr/local/samba/sbin/samba: Permission denied I thought to myself that it is clearly permissions related,so I created a user account with 'useradd -r -M samba' and then in the systemd service file I set the user to samba: [Unit] Description=Samba Active Directory Domain Controller After=network.target remote-fs.target nss-lookup.target [Service] Type=forking User=samba ExecStart=/usr/local/samba/sbin/samba -D PIDFile=/usr/local/samba/var/run/samba.pid ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target I then thought to myself that the path having problems is /usr/local/samba/sbin/samba so I set samba to be the owner and gave this user full read write execute permissions with: sudo chown -R sambaConfusedamba /usr/local/samba/sbin/samba sudo chmod -R 744 /usr/local/samba/sbin/samba Yet I still get the same permissions issues, it mentions 'failed at step exec spawning' is there some way I can allow the samba system user account to spawn processes or is there a step I have missed here in the systemd service file or something I have done plain wrong?

S
Sparks879
Junior Member
5
09-15-2025, 10:37 PM
#2
744 is the RWX entry for Samba: sambaConfusedamba. It runs from a prebuilt pack and is owned by root with permissions 755.
S
Sparks879
09-15-2025, 10:37 PM #2

744 is the RWX entry for Samba: sambaConfusedamba. It runs from a prebuilt pack and is owned by root with permissions 755.

X
xXRAXERXx
Posting Freak
817
09-16-2025, 01:44 AM
#3
I attempted to assign ownership to root and adjust permissions once more, but the same problem persists: [dcadmin@dc01 ~]$ sudo chmod -R 744 /usr/local/samba/sbin/samba [dcadmin@dc01 ~]$ sudo systemctl start samba-ad-dc Job for samba-ad-dc.service failed because the control process exited with error code. Refer to "systemctl status samba-ad-dc.service" and "journalctl -xeu samba-ad-dc.service" for more information. [dcadmin@dc01 ~]$ ls -la /usr/local/samba/sbin/samba -rwxr--r--. 1 root root 60688 Jan 20 20:50 /usr/local/samba/sbin/samba
X
xXRAXERXx
09-16-2025, 01:44 AM #3

I attempted to assign ownership to root and adjust permissions once more, but the same problem persists: [dcadmin@dc01 ~]$ sudo chmod -R 744 /usr/local/samba/sbin/samba [dcadmin@dc01 ~]$ sudo systemctl start samba-ad-dc Job for samba-ad-dc.service failed because the control process exited with error code. Refer to "systemctl status samba-ad-dc.service" and "journalctl -xeu samba-ad-dc.service" for more information. [dcadmin@dc01 ~]$ ls -la /usr/local/samba/sbin/samba -rwxr--r--. 1 root root 60688 Jan 20 20:50 /usr/local/samba/sbin/samba

S
SlappyHapper
Junior Member
13
09-17-2025, 01:47 AM
#4
Initially you displayed LOG file entries with error details, now only key info remains. For experiment, give 777 to 'samba'.
S
SlappyHapper
09-17-2025, 01:47 AM #4

Initially you displayed LOG file entries with error details, now only key info remains. For experiment, give 777 to 'samba'.

Y
yG4BR13L
Member
111
09-18-2025, 07:37 PM
#5
samba is marked as executable by adding the appropriate permissions. You can run it without root using the specified chmod command. Regarding running it as a non-root user, you may need to adjust permissions or consider alternatives since samba uses privileged ports. On RHEL systems, SELinux settings might affect access.
Y
yG4BR13L
09-18-2025, 07:37 PM #5

samba is marked as executable by adding the appropriate permissions. You can run it without root using the specified chmod command. Regarding running it as a non-root user, you may need to adjust permissions or consider alternatives since samba uses privileged ports. On RHEL systems, SELinux settings might affect access.