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
amba /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?
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 samba
amba /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?
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
Initially you displayed LOG file entries with error details, now only key info remains. For experiment, give 777 to 'samba'.
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.