From 24b1de1bf6045340c2df4cc2e63e80de3fdaf861 Mon Sep 17 00:00:00 2001 From: DubhAd Date: Fri, 21 Sep 2018 20:37:03 +0100 Subject: [PATCH] More titles (#6332) Added a couple of titles to make linking into the page easier. Also expanded on why capabilities are useful. --- .../device_tracker.nmap_tracker.markdown | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source/_components/device_tracker.nmap_tracker.markdown b/source/_components/device_tracker.nmap_tracker.markdown index 061ae8a153e..11b0e0531db 100644 --- a/source/_components/device_tracker.nmap_tracker.markdown +++ b/source/_components/device_tracker.nmap_tracker.markdown @@ -2,7 +2,7 @@ layout: page title: "Nmap" description: "Instructions on how to integrate Nmap into Home Assistant." -date: 2015-03-23 19:59 +date: 2018-09-21 18:59 sidebar: true comments: false sharing: true @@ -43,6 +43,7 @@ Configuration variables: - **exclude** (*Optional*): Hosts not to include in nmap scanning. Scanning the host where Home Assistant is running can cause problems (websocket error), so excluding that host is a good idea. - **scan_options** (*Optional*): Configurable scan options for nmap. Default to `-F --host-timeout 5s` +## {% linkable_title Examples %} A full example for the `nmap` tracker could look like the following sample: @@ -73,10 +74,13 @@ In the above example, Nmap will be call with the process: An example of how the Nmap scanner can be customized: -Add the capabilities to Nmap. Be sure to specify the full path to wherever you installed Nmap: +### {% linkable_title Linux capabilities %} -`sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap -` +On Linux systems you can extend the functionality of Nmap, without having to run it as root, by using *Linux capabilities*. Be sure to specify the full path to wherever you installed Nmap: + +```bash +$ sudo setcap cap_net_raw,cap_net_admin,cap_net_bind_service+eip /usr/bin/nmap +``` And you can set up the device tracker as ```yaml @@ -85,5 +89,4 @@ And you can set up the device tracker as scan_options: " --privileged -sP " ``` - See the [device tracker component page](/components/device_tracker/) for instructions how to configure the people to be tracked.