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 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?

4 Answers 4


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:

Description=BeyondTrust PBIS Service Manager

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.

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!

  • This one also worked in Fedora 23 for me
    – Krish
    Dec 31, 2015 at 9:45

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.

  • Any alternative to join a windows domain? Thanks
    – matubat91
    Apr 27, 2015 at 15:25
  • There's either a startup script or a systemd unit. Apr 27, 2015 at 20:33

I found this to kind of work so that domainjoin-cli query would work.

sudo /etc/init.d/lwsmd restart
sudo domainjoin-cli query

Some addition, in /lib/systemd/system/lwsmd.service you should use


Because lwsmd service writes krb5cc_uid file for user and computer in /tmp/systemd-private-/some hash/-lwsmd.service/tmp and other applications (browsers, samba clients) can't find it in /tmp/

Therefore SSO doesn't work

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .