Skip to content

Instantly share code, notes, and snippets.

@vikas027
Last active March 6, 2020 22:25
Show Gist options
  • Save vikas027/3e4e2cf0ff69c0c3540b to your computer and use it in GitHub Desktop.
Save vikas027/3e4e2cf0ff69c0c3540b to your computer and use it in GitHub Desktop.
Fix PowerBroker Identity Service (formerly Likewise) on CentOS 7
PBIS (PowerBroker Identity Service) throws some errors while installing v8.2.2 (latest as of 25 June 2015) rpm.
[root@centos7 ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)
[root@centos7 ~]# ./pbis-open-8.2.2.2993.linux.x86_64.rpm.sh install (This is filtered output)
...
...
Error: /usr/bin/systemctl enable /etc/pbis/redhat/lwsmd.service returned 1
Failed to issue method call: Unit /etc/pbis/redhat/lwsmd.service does not exist.
Error: /sbin/service lwsmd start returned 6
Redirecting to /bin/systemctl start lwsmd.service Failed to issue method call: 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
...
[root@centos7 ~]#
To rectify the errors, run the below commands and reboot the server.
[root@centos7 ~]# ln -s /etc/pbis/redhat/lwsmd.service /etc/systemd/system/lwsmd.service
[root@centos7 ~]# cp /etc/pbis/redhat/lwsmd.service /lib/systemd/system/lwsmd.service
[root@centos7 ~]# systemctl enable lwsmd.service
@docsmooth
Copy link

docsmooth commented Jun 24, 2015

http://repo.pbis.beyondtrust.com/yum.html

Add the repo to your system, do a yum install (BTW, the current version is 8.3, but you had the issue on 8.2.2, so here's exactly that log), then join the domain.

Log:

[root@centos7-1 ~]# yum install pbis-open-8.2.2
...
<snip>
...
Installed:
  pbis-open.x86_64 0:8.2.2-2993

Dependency Installed:
  pbis-open-upgrade.x86_64 0:8.3.0-3287

Complete!
You have new mail in /var/spool/mail/root
[root@centos7-1 ~]# systemctl status lwsmd
lwsmd.service - BeyondTrust PBIS Service Manager
   Loaded: loaded (/etc/pbis/redhat/lwsmd.service; enabled)
   Active: active (running) since Wed 2015-06-24 14:41:04 CDT; 48s ago
  Process: 8782 ExecStart=/opt/pbis/sbin/lwsmd --start-as-daemon (code=exited, status=0/SUCCESS)
 Main PID: 8784 (lwsmd)
   CGroup: /system.slice/lwsmd.service
           ├─8784 /opt/pbis/sbin/lwsmd --start-as-daemon
           ├─8797 lw-container lwreg
           ├─8815 lw-container eventlog
           ├─8831 lw-container netlogon
           ├─8846 lw-container lwio
           ├─8863 lw-container lsass
           └─8886 lw-container reapsysl

Jun 24 14:41:03 centos7-1 systemd[1]: Ignoring invalid environment '[ "$1"=start-a -n "${POSTSTARTHOOK}" ] && ${POSTSTARTHOOK}': /opt/pbis/libexec/init-base.sh
Jun 24 14:41:03 centos7-1 /opt/pbis/sbin/lwsmd[8784]: Logging started
Jun 24 14:41:03 centos7-1 lwreg[8797]: Logging started
Jun 24 14:41:03 centos7-1 eventlog[8815]: Logging started
Jun 24 14:41:03 centos7-1 netlogon[8831]: Logging started
Jun 24 14:41:03 centos7-1 lwio[8846]: Logging started
Jun 24 14:41:03 centos7-1 lsass[8863]: Logging started
Jun 24 14:41:04 centos7-1 reapsysl[8886]: Logging started
Jun 24 14:41:04 centos7-1 systemd[1]: Started BeyondTrust PBIS Service Manager.
Jun 24 14:41:04 centos7-1 lsass[8863]: [lsass] Failed to run provider specific request (request code = 12, provider = 'lsa-activedirectory-provider') -> error = 2692, symbol = NERR_SetupNotJoin...ient pid = 8915
Hint: Some lines were ellipsized, use -l to show in full.
[root@centos7-1 ~]# domainjoin-cli join child1.lwtest.corp administrator
Joining to AD Domain:   child1.lwtest.corp
With Computer DNS Name: centos7-1.child1.lwtest.corp

[email protected]'s password:
SUCCESS
[root@centos7-1 ~]# cat /etc/redhat-release
CentOS Linux release 7.1.1503 (Core)

@vikas027
Copy link
Author

You are right, 8.3.0-3287 is the latest now. However, 8.2.2-2993 was the latest available through the shell script (encapsulated with rpms) that day.

Anyways, can you try runnning 'systemctl enable lwsmd' ? I still get that error in both the versionswith the shell script and the repo (which is obvious) as well. I had updated systemd in both cases.

This is not alarming, but the below command gives me an option to enable the service after disabling it which I believe is important for me.

[root@centos7 ~]# cp /etc/pbis/redhat/lwsmd.service /lib/systemd/system/lwsmd.service

Check this.

[root@centos7 ~]# yum install pbis-open
[root@centos7 ~]# systemctl status lwsmd  (running, I have removed the output)
[root@centos7 ~]# systemctl stop lwsmd
[root@centos7 ~]# systemctl status lwsmd  (stopped, I have removed the output)
[root@centos7 ~]# systemctl enable lwsmd.service
Failed to issue method call: No such file or directory
[root@centos7 ~]# systemctl disable lwsmd.service
rm '/etc/systemd/system/multi-user.target.wants/lwsmd.service'
rm '/etc/systemd/system/nss-lookup.target.wants/lwsmd.service'
rm '/etc/systemd/system/lwsmd.service'
[root@centos7 ~]# systemctl enable lwsmd.service
Failed to issue method call: No such file or directory
[root@centos7 ~]# systemctl status lwsmd
lwsmd.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

[root@centos7 ~]#

Overall, this is the process one should follow on CentOS 7.

yum update systemd

yum install pbis-open
or
./pbis-open-8.*.linux.x86_64.rpm.sh install

cp /etc/pbis/redhat/lwsmd.service /lib/systemd/system/lwsmd.service

After this these commands behave as they should.

[root@centos7 ~]# systemctl status lwsmd  (running, I have removed the output)
[root@centos7 ~]# systemctl stop lwsmd
[root@centos7 ~]# systemctl status lwsmd  (stopped, I have removed the output)
[root@centos7 ~]# systemctl disable lwsmd.service
rm '/etc/systemd/system/multi-user.target.wants/lwsmd.service'
rm '/etc/systemd/system/nss-lookup.target.wants/lwsmd.service'
rm '/etc/systemd/system/lwsmd.service'
[root@centos7 ~]# systemctl enable lwsmd.service
ln -s '/usr/lib/systemd/system/lwsmd.service' '/etc/systemd/system/multi-user.target.wants/lwsmd.service'
ln -s '/usr/lib/systemd/system/lwsmd.service' '/etc/systemd/system/nss-lookup.target.wants/lwsmd.service'
[root@centos7 ~]# systemctl start lwsmd
[root@centos7 ~]# systemctl status lwsmd  (running, I have removed the output)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment