Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix testing fping output when the LibreNMS user doesn't have a valid … #10567

Merged

Conversation

@BrianSidebotham
Copy link
Contributor

commented Aug 29, 2019

…shell

Normally, the librenms user will not have a default shell (We don't want this user logging in to the system, etc.). But this breaks the fping tests because the lack of shell means we get no output from the tests. This simple pull requests sets a shell for the librenms user if the script is running as root.

For example:

[root@localhost ~]# cat /etc/passwd | grep librenms
librenms:x:991:986::/opt/librenms:/bin/false

[root@localhost ~]# su librenms -c "fping6 ::1"

[root@localhost ~]# su librenms -s /bin/sh -c "fping6 ::1"
::1 is alive

This results in validate.php running correctly for root as well as the librenms user.

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

@CLAassistant

This comment has been minimized.

Copy link

commented Aug 29, 2019

CLA assistant check
All committers have signed the CLA.

@PipoCanaja PipoCanaja added the Bug 🐞 label Aug 31, 2019

@PipoCanaja PipoCanaja merged commit d0d7d85 into librenms:master Sep 2, 2019

6 checks passed

Inspection Summary
Details
Node: analysis
Details
Travis CI - Pull Request Build Passed
Details
WIP Ready for review
Details
codeclimate All good!
Details
license/cla Contributor License Agreement is signed.
Details
@murrant

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/v1-55-release-changelog-august-2019/9428/1

@BrianSidebotham BrianSidebotham deleted the wanless-systems:fix-no-librenms-user-shell branch Sep 3, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.