Skip to main content
2 of 2
deleted 3 characters in body; edited tags; edited title
Jeff Schaller
  • 68.8k
  • 35
  • 122
  • 267

How do start network settings in Debian Raspberry PI in a non-root user

Every time I log in to my user account "bob" I have to use these commands (with sudo or in the root account) to connect to the WiFi:

wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf dhclient wlan0 

wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf gives me this result :

Successfully initialized wpa_supplicant Could not set interface wlan0 flags (UP): Operation not permitted WEXT: Could not set interface 'wlan0' UP wlan0: Failed to initialized driver interface 

And for dhclient wlan0 I get:

RTNETLINK answers: Operation is unreachable 

I am doing this on a Raspberry PI 4 with Debian 10 Codename: buster.

I have systemd.

How do I set up my environment so that every time I boot up, or I log in with "bob" or even root, my system connects to the WiFi?

I was thinking of using the commands I just showed and put them in .profile but I cannot run them with the "bob" account.

jnbdz
  • 191
  • 2
  • 8