The install instructions in pkg-message state: > to get Netdisco running, you just have to: > * edit /usr/local/etc/netdisco/environments/deployment.yml to suit your needs > (perldoc App::Netdisco::Manual::Configuration) $ perldoc App::Netdisco::Manual::Configuration No documentation found for "App::Netdisco::Manual::Configuration" > * edit rc.conf according to /usr/local/etc/rc.d/netdisco > * read "perldoc App::Netdisco::Manual::Deployment" $ perldoc App::Netdisco::Manual::Deployment No documentation found for "App::Netdisco::Manual::Deployment". > * place env NETDISCO_HOME=/usr/local/etc/netdisco Place it where? > * launch netdisco-deploy *as user netdisco* to install/upgrade your database $ sudo -u netdisco netdisco-deploy Sorry, can't find libs required for App::Netdisco. BEGIN failed--compilation aborted at /usr/local/bin/netdisco-deploy line 25. > * copy (or link) /usr/local/etc/netdisco/netdiscologs.conf > to /usr/local/etc/newsyslog.conf.d/ to take care > of logs rotation > Always use "su - netdisco" before running netdisco-do or netdisco-deploy > (because of locallib use) $ sudo su - netdisco su: no directory
You are right, I did no rewiew this file since a long time. New pkg-message should better read: to get Netdisco running, you just have to: * edit /usr/local/etc/netdisco/environments/deployment.yml to suit your needs (https://github.com/netdisco/netdisco/wiki/Configuration) * edit rc.conf according to /usr/local/etc/rc.d/netdisco * have a look at https://metacpan.org/pod/App::Netdisco note that ~/environments is replaced here by /usr/local/etc/netdisco/environments * make variable NETDISCO_HOME=/usr/local/etc/netdisco available for user netdisco echo "export NETDISCO_HOME=/usr/local/etc/netdisco" >> ~netdisco/.profile chown netdisco ~netdisco/.profile * launch netdisco-deploy *as user netdisco* to install/upgrade your database su - netdisco -c "netdisco-deploy" * copy (or link) /usr/local/etc/netdisco/netdiscologs.conf to /usr/local/etc/newsyslog.conf.d/ to take care of logs rotation ln -s /usr/local/etc/netdisco/netdiscologs.conf /usr/local/etc/newsyslog.conf.d/netdiscologs.conf Always use "su - netdisco" or "sudo -l -u netdisco" before running any netdisco-do or netdisco-* command (because of locallib use)
Currently working on a patch to fix these… This time I think I get it running more easily: netdisco user still missed a HOME dir and a shell… I corrected in UIDs, placing HOME in /usr/local/etc/netdisco (this avoid need of NETDISCO_HOME variable) you can make it effective for you running: pw user mod -s /bin/sh -d /usr/local/etc/netdisco -u netdisco After that, "sudo -l -u netdisco" on "su - netdisco" should do the work The docs have been replaced by wiki pages, I updated this.
Created attachment 242078 [details] git diff UIDs net-mgmt/netdisco: fix and update fix pkg-message update to 2.061001 New features: - ACLs portctl_no and portctl_only for limiting port control targets - Config setting portctl_nowaps to prevent port control on WAP ports - Feature to gather SNMP Walk, use as Pseudo Device, and Browse Objects - Added SSHCollector::Platform::ASAContext - new addpseudodevice worker action - option to display vlan names instead of numbers in device ports - renumber device option in the device details web page - add option in device ports sidebar to hide vlan 1002-1005 - Group Cisco subinterfaces in Device Ports view (like LAG) - add FortiOS SSH collector implementation from @jpvelders - make Port VLAN mismatch respect setting hiding VLAN 1002-1005 - make VLAN hiding and VLAN names configurable options and move to port properties sidebar section - new discover_routed_neighbors setting to skip adding next-hops for discovery - new setting macsuck_no_deviceport to ignore nodes on a device port - implement ignore_deviceports and hide_deviceports settings - implement multi tenancy with tenant_databases setting - add worker to collect various PortAccessEntity (NAC) attributes - API Endpoints to submit arpnip and macsuck results - custom fields on devices and ports in the web from config - sidebar support for custom reports with bind params; add show_sidebar setting - support for FQDN node search while domain_suffix is set; add fallback to IPv4 host lookup search - implement ignore_layers, force_macsuck, force_arpnip config settings Many bug fixes and enhancements too, see https://metacpan.org/dist/App-Netdisco/changes for full list
Thanks for the very quick repsonse! I can run it now manually, but I'm attempting to add it to an ansible playbook. That's my problem... One thing I noticed is that netdisco-deploy requires p5-Crypt-Bcrypt if the admin user doesn't already exist. It should probably be added as a run dependency.
(In reply to geoffroy desvernay from comment #2) Seems it still needs NETDISCO_HOME even with netdisco home set to /usr/local/etc/netdisco
Created attachment 242090 [details] git diff UIDs net-mgmt/netdisco: fix and update Added p5-Crypt-Bcrypt dependency and a line about NETDISCO_HOME If you reinstall with this patch, you'll need to dele netdisco user before, or change it to make his HOME be /usr/local/etc/netdisco and SHELL /bin/sh (at least)
(In reply to geoffroy desvernay from comment #6) Can you provide detailed instructions to add to UPDATING?
(In reply to Fernando Apesteguía from comment #7) Ping
(In reply to Fernando Apesteguía from comment #8) Last ping.
sorry for the delay. I'd add this: 20230531: AFFECTS: users of net-mgmt/netdisco AUTHOR: dgeo@centrale-marseille.fr The netdisco user now needs a HOME and a shell. For existing installs you will need to set HOME to /usr/local/etc/netdisco and shell to /bin/sh. For example in one shell line: pw user mod netdisco -d /usr/local/etc/netdisco -s /bin/sh
(In reply to geoffroy desvernay from comment #10) Excellent, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=d7272b56ac851a1e032199f3043fc7c9e2c4f1a3 commit d7272b56ac851a1e032199f3043fc7c9e2c4f1a3 Author: geoffroy desvernay <dgeo@centrale-marseille.fr> AuthorDate: 2023-06-01 06:43:42 +0000 Commit: Fernando Apesteguía <fernape@FreeBSD.org> CommitDate: 2023-06-02 06:47:11 +0000 net-mgmt/netdisco: Update to 2.061001 While here, fix install instructions. New features: * ACLs portctl_no and portctl_only for limiting port control targets * Config setting portctl_nowaps to prevent port control on WAP ports * Feature to gather SNMP Walk, use as Pseudo Device, and Browse Objects * Added SSHCollector::Platform::ASAContext * new addpseudodevice worker action * option to display vlan names instead of numbers in device ports * renumber device option in the device details web page * add option in device ports sidebar to hide vlan 1002-1005 * Group Cisco subinterfaces in Device Ports view (like LAG) * add FortiOS SSH collector implementation from @jpvelders * make Port VLAN mismatch respect setting hiding VLAN 1002-1005 * make VLAN hiding and VLAN names configurable options and move to port properties sidebar section * new discover_routed_neighbors setting to skip adding next-hops for discovery * new setting macsuck_no_deviceport to ignore nodes on a device port * implement ignore_deviceports and hide_deviceports settings * implement multi tenancy with tenant_databases setting * add worker to collect various PortAccessEntity (NAC) attributes * API Endpoints to submit arpnip and macsuck results * custom fields on devices and ports in the web from config * sidebar support for custom reports with bind params; add show_sidebar setting * support for FQDN node search while domain_suffix is set; add fallback to IPv4 host lookup search * implement ignore_layers, force_macsuck, force_arpnip config settings Many bug fixes and enhancements too, see https://metacpan.org/dist/App-Netdisco/changes for full list PR: 271329 Reported by: einar@isnic.is UIDs | 2 +- UPDATING | 11 +++++ net-mgmt/netdisco/Makefile | 3 +- net-mgmt/netdisco/distinfo | 6 +-- net-mgmt/netdisco/files/pkg-message.in | 14 +++--- net-mgmt/netdisco/pkg-plist | 82 +++++++++++++++++++++++++++++++++- 6 files changed, 107 insertions(+), 11 deletions(-)
Committed, Thanks!