As per this: https://linux.die.net/man/8/iwlist I understand that scanning of WiFi Networks requires root access. If you are a regular user than you can only see the Wifi Network you are connected with. Lets go into my problem...
As a regular user when I use this command in terminal:
iwlist wlan0 scan|grep "Frequency\|Quality\|ESSID"
Then my output is this:
Frequency:2.417 GHz (Channel 2)
Quality=67/70 Signal level=-43 dBm
ESSID:"My-WiFi"
That is the network I am currently connected to (My-WiFi)
When I run this command in terminal as sudo:
sudo iwlist wlan0 scan|grep "Frequency\|Quality\|ESSID"
Then my output is this:
Frequency:2.417 GHz (Channel 2)
Quality=69/70 Signal level=-41 dBm
ESSID:"My-WiFi"
Frequency:2.412 GHz (Channel 1)
Quality=43/70 Signal level=-67 dBm
ESSID:"MySpectrumWiFi54-2G"
Frequency:2.412 GHz (Channel 1)
Quality=61/70 Signal level=-49 dBm
ESSID:"MySpectrumWiFif4-2G"
Frequency:2.427 GHz (Channel 4)
Quality=36/70 Signal level=-74 dBm
ESSID:"MyCharterWiFieb-2G
My problem is that I need to scan the WiFi networks without a normal user having sudo access.
How can I change permissions to run iwlist wlan0 scan|grep "Frequency\|Quality\|ESSID" to show the sudo output, but without using sudo or having root access?