Strange issue after changing librenms password

so we had to change the librenms linux username and then alot of the CLI now shows this:
I admit to be a linux newby… so I am sure I did something wrong…
where to start?

libreadmin@libre-ubuntu:/opt/librenms$ su librenms ./validate.php
Password:
./validate.php: line 2: ?php: No such file or directory
./validate.php: line 4: /bin: Is a directory
./validate.php: line 5: addhost.php: command not found
./validate.php: line 6: addhost.php: command not found
./validate.php: line 7: syntax error near unexpected token (' ./validate.php: line 7: * Copyright (c) 2014 Neil Lathwood <laf (Neil Lathwood) · GitHub http://www.lathwood.co.uk/fa>’

My goal here is I need to add about 130 devices and really want to do it in the CLI, as they are all MSP/ISP devices…

Hello there,

I think the default user for libre is not libreadmin but librenms.

Also, please make sure that you are on the correct directory by using the ls -la command.

Best Regards,

What do you mean by “change the linux username”? If you want to let a already installed LibreNMS run under a different user-account, you need to change that at several places:

  • chown all stuff under /opt/librenms to the new user
  • set home-dir of new user to /opt/librenms
  • Check ini-files at /etc/php/…/fpm/php.ini and /etc/php/…/cli/php.ini for username and replace respectivly

Best would be to check all steps here again: Installing LibreNMS - LibreNMS Docs

And then test by manually running

sudo su - <new-username>
./validate.php

HTH

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.