Ubuntu 15.04 join domain problem (pbis)

I just installed a clean Ubuntu 15.04, and I want to join to a domain for active directory.

Downloaded and installed PBIS Open 8.2.2 - Stable Release but when i run it:

Error: /usr/sbin/service lwsmd start returned 6
Failed to start lwsmd.service: Unit lwsmd.service failed to load: No  such file or directory.

regshell (error = 40700 - LWREG_ERROR_NO_SUCH_KEY_OR_VALUE)
No such key or value 


 Error code: ERROR_FILE_NOT_FOUND (0x00000002)

and

Backtrace:
/builder/src-buildserver/Platform-8.2/src/linux/domainjoin/domainjoin-gui/gtk/main.c:614
/builder/src-buildserver/Platform-8.2/src/linux/domainjoin/libdomainjoin/src/djapi.c:257
/builder/src-buildserver/Platform-8.2/src/linux/domainjoin/libdomainjoin/src/djroutines.c:54
/builder/src-buildserver/Platform-8.2/src/linux/domainjoin/libdomainjoin/src/djauthinfo.c:1027

And when I execute the domainjoin-cli it returns me:

Error: Received error while querying lwsmd. [code 0x00000002]

when I try to execute /etc/init.d/lwsmd start, Ubuntu doesn't find it.

How should I proceed?


You need to create a systemd unit file for this service, and then enable it. The following worked for me on Ubuntu 15.04 (upgraded from 14.04) with PBIS 8.2.2.

Create the file lwsmd.service in /lib/systemd/system like this:

nano /lib/systemd/system/lwsmd.service

Here are the contents (paste this in to the file you created above) (taken from a redhat one) so thanks to them:

[Unit]
Description=BeyondTrust PBIS Service Manager
After=network.target

[Service]
Type=forking
EnvironmentFile=/opt/pbis/libexec/init-base.sh
ExecStart=/opt/pbis/sbin/lwsmd --start-as-daemon
ExecReload=/opt/pbis/bin/lwsm refresh
ExecStop=/opt/pbis/bin/lwsm shutdown
# We want systemd to give lwsmd some time to finish gracefully, but still want
# it to kill lwsmd after TimeoutStopSec if something went wrong during the
# graceful stop. Normally, Systemd sends SIGTERM signal right after the
# ExecStop, which would kill lwsmd. We are sending useless SIGCONT here to give
# lwsmd time to finish.
KillSignal=SIGCONT
PrivateTmp=true

[Install]
WantedBy=multi-user.target nss-lookup.target

Once this is done, make a symlink to this file in /etc/systemd/system:

cd /etc/systemd/system
ln -s /lib/systemd/system/lwsmd.service

At this point you should be able to type:

service lwsmd status

and see that the service exists and is enabled.

Then typing:

service lwsmd start

should start it up and have pbis working as expected.

Now to make it work at boot time. Enable the service with this command:

systemctl enable lwsmd.service

It should give some feedback about creating some symlinks.

Then reboot your comp and all should be working.

I hope it was clear enough, and please forgive any typos... Good luck!


PBIS is not yet installing a service script (startup script) compatible to systemd in ubuntu. You will have to wait fpr pbis guys to fix that or copy the one used for Fedora/Redhat and startup lwsmd before trying to join your domain.