On RedHat 7 and 8, when I run eDir with a non-root instance, I've been using a SystemD unit file like this:
[Unit]
Description=IDM-VAULT eDirectory
After=syslog.target network.target
[Service]
Type=forking
User=svc_edir
Group=svc_edir
ExecStart=/opt/novell/eDirectory/bin/ndsmanage startall
ExecStop=/opt/novell/eDirectory/bin/ndsmanage stopall
Restart=on-failure
[Install]
WantedBy=multi-user.target
In this case, svc_edir is the non-privileged user I'm running my eDir instance as. This works just fine on RedHat 7 and 8. However, on SLES 12 SP5, I can't get this to work no matter what I do. I get an error when the ndsmanage command is executed:
---
Server instances management utility for NetIQ eDirectory 9.2.1 v40202.00
Instance at /etc/opt/novell/eDirectory/conf/nds.conf.....
Starting NetIQ eDirectory server...
Failed to connect to bus: No such file or directory
---
I've tried everything I can find for that error. I found this TID which talks about a similar problem running ndsmanage:
https://support.microfocus.com/kb/doc.php?id=7023281#
But that did not fix this issue. I've tried adding these commands to the user's .profile, .bashrc, and .bash_profile:
export XDG_RUNTIME_DIR=/run/user/`id -u`
export DBUS_SESSION_BUS_ADDRESS="unix:path=${XDG_RUNTIME_DIR}/bus"
But that doesn't seem to make any difference.
I also tried using systemctl --user, which allows non-root users to launch SystemD services. I put a slightly different unit file in /home/svc_edir/.config/systemd/user
[Unit]
Description=IDM-VAULT eDirectory
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/novell/eDirectory/bin/ndsmanage startall
ExecStop=/opt/novell/eDirectory/bin/ndsmanage stopall
Restart=on-failure
RemainAfterExit=yes
[Install]
WantedBy=default.target
This works if I run it from a shell as the user svc_edir, but it doesn't work right on boot. When I reboot the server, it somehow runs svc_edir's instance as root and kinda makes a mess. I have to kill ndsd to stop it.
I'm not an expert on SystemD, but I believe this problem has something to do with dbus, but I'm not sure what.
Can anyone that knows more about SystemD shed some light?
Thanks.
Matt