Wifi auto connect at boot

Issues related to configuring your network
Post Reply
rhanthony
Posts: 8
Joined: 2017/11/10 21:06:40

Wifi auto connect at boot

Post by rhanthony » 2017/11/15 00:35:27

I've just gotten a wifi adapter on to my CentOS7 media server box. I am able to connect to an SSID and get packets flowing. I can not however get it to auto-connect on a reboot. I can get the adapter to come up with /etc/rc.modprobe but it won't auto-connect to anything. It will be the only interface on the box so I need it to come right up when the machine gets rebooted (rare but happens).

It's listing in ifconfig -a

Code: Select all

wlp0s16f1u2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.1.11  netmask 255.255.255.0  broadcast 10.0.1.255
        inet6 fe80::443a:1b57:f41f:4c19  prefixlen 64  scopeid 0x20<link>
        ether 9c:ef:d5:fe:b8:99  txqueuelen 1000  (Ethernet)
        RX packets 248094  bytes 17650627 (16.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 614610  bytes 933820360 (890.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sidusnare
Posts: 10
Joined: 2017/11/15 18:19:49

Re: Wifi auto connect at boot

Post by sidusnare » 2017/11/15 19:51:29

Wifi passwords are typically stored in a login session's keychain, so you don't get wifi till you log in because it has no passwords.

You would need to put your wifi password directly into the connection's config to do this automatically at boot

Your connections are in /etc/NetworkManager/system-connections/
You want to replace whatever is in the 802-11-wireless-security with static password settings, something like:

Code: Select all

[connection]
id=MYNETWORKNAME
uuid=########-####-####-#####-#############
type=802-11-wireless
permissions=group:users:;

[802-11-wireless]
ssid=MYSSID
mode=infrastructure
security=802-11-wireless-security

[802-11-wireless-security]
key-mgmt=wpa-psk
psk=MYSPECIALPASSWORD

[ipv4]
method=auto
route-metric=2000

[ipv6]
method=auto

Post Reply