Gentoo Archives: gentoo-user

From: Tom H <tomh0665@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Re: [systemd] Is this a NetworkManager bug?
Date: Fri, 17 Oct 2014 01:45:21
Message-Id: CAOdo=Syjx59cUuyvxAO9QkCoG00aWhRH9ghJ46VTr6TWAqd24w@mail.gmail.com
In Reply to: [gentoo-user] Re: [systemd] Is this a NetworkManager bug? by walt
1 On Thu, Oct 16, 2014 at 4:53 PM, walt <w41ter@×××××.com> wrote:
2 > On 10/15/2014 08:23 PM, Tom H wrote:
3 >> On Mon, Oct 13, 2014 at 7:39 PM, walt <w41ter@×××××.com> wrote:
4 >>>
5 >>> I just switched my home LAN from wired to all wifi and I'm having trouble
6 >>> with NetworkManager at boot time.
7 >>>
8 >>> I have systemd start NetworkManager at boot because I need the internet
9 >>> for ntpdate and to start the nfs server for the LAN. Before I switched
10 >>> to all-wireless this method worked perfectly, but no longer.
11 >>>
12 >>> After bootup I see that NetworkManager started wpa_supplicant in the
13 >>> background, but apparently does *not* run dhcpcd. (The wlan0 is up
14 >>> but it has no IP address and the routing table is empty.)
15 >>>
16 >>> As an alternative to NetworkManager I can have systemd start dhcpcd
17 >>> at boot, which almost (but not quite) works well enough. This
18 >>> causes a race condition because wlan0 takes several seconds to come
19 >>> up properly and by then both ntpdate and nfs-server have already
20 >>> run and failed.
21 >>>
22 >>> So, I asked myself, why not have systemd start dhcpcd at boot in
23 >>> addition to NetworkManager?
24 >>>
25 >>> The reason that fails is that they both start wpa_supplicant in
26 >>> the background and the two instances interfere with each other.
27 >>>
28 >>> Anyone see a way around this catch22?
29 >>
30 >> Do you have "All users may connect" unticked in the NM applet or
31 >> "permissions=user:walt:;" in the NM connection's config?
32 >
33 > After studying the logs I'm beginning to think that NM is actually
34 > trying to start wlan0 at boot time but failing with this message:
35 > 'no secrets', which I assume means no password, maybe?
36 >
37 > Yes, I do have the all-users box ticked. Question: I've set up the
38 > wlan0 connection (as root) several times using nmtui, including the
39 > SSID password, yet each time I start nmtui the password field is blank
40 > again. Is this normal behavior? How can I tell if the password is
41 > actually being stored somewhere?
42
43 I've never used nmtui (I didn't even know about it).
44
45 This the config that I use when i visit my parents (I use a static
46 address at home so this corresponds to your use-case). It has to be in
47 0600 mode for NM to use it.
48
49 # cat /etc/NetworkManager/system-connections/mumdad
50 [connection]
51 id=mumdad
52 uuid=da59ada3-1349-49fe-b63b-bc68f67b6f89
53 type=802-11-wireless
54
55 [802-11-wireless]
56 ssid=number96
57 mode=infrastructure
58 security=802-11-wireless-security
59
60 [802-11-wireless-security]
61 key-mgmt=wpa-psk
62 psk=xxxxxxxxx
63
64 [ipv4]
65 method=auto
66 dns=8.8.8.8;8.8.4.4;
67
68 [ipv6]
69 method=link-local
70
71 You have to have "plugins=keyfile" in the "[main]" section of
72 "/etc/NetworkManager/NetworkManager.conf" for the above to work.