Announcement

Collapse
No announcement yet.

wlan0 not brought up at boot, only at desktop login.

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • kubicle
    replied
    Originally posted by Erwin Smout View Post
    No, don't remember having seen such an option.
    I'm running KDE Neon, so I can't be sure the GUI option is there in Kubuntu 16.04, which has an older version of the Plasma desktop. (I haven't used this option before, so I don't really know how long it has been there...although I did try it and it works and connects automatically before login).

    The option should be in a drop down menu right below the network password field. If it isn't, it's also possible to modify the network configuration file (/etc/NetworkManager/system-connections/<network_name>) manually, changing "psk-flags=1" to "psk=<password>" (replacing "<password>" with your actual network password).

    Leave a comment:


  • Erwin Smout
    replied
    Originally posted by kubicle View Post
    Did you try setting "save password for all users" in the wifi-protection tab in network settings for the connection? (This will save the passphrase in the network config file under /etc/NetworkManager/system-connections).
    No, don't remember having seen such an option.

    Leave a comment:


  • kubicle
    replied
    Originally posted by Erwin Smout View Post
    I tried that and I know it didn't work for me. Might have been an issue of root having no access to KWallet (where I assume the passphrase was/is) or might have been me making some mistake, but it didn't work for me.
    Did you try setting "save password for all users" in the wifi-protection tab in network settings for the connection? (This will save the passphrase in the network config file under /etc/NetworkManager/system-connections).

    Leave a comment:


  • Erwin Smout
    replied
    Originally posted by claydoh View Post
    I believe if you go into your connection's settings, you can check the option to have that connection available to all users, which make it connect before login. That is how I have always done it.
    You also specify static addresses, etc from there.
    I tried that and I know it didn't work for me. Might have been an issue of root having no access to KWallet (where I assume the passphrase was/is) or might have been me making some mistake, but it didn't work for me.

    Leave a comment:


  • GreyGeek
    replied
    Thanks, Kubicle, that clears up a lot of things.

    Leave a comment:


  • kubicle
    replied
    Originally posted by GreyGeek View Post
    Ah, the user is in the set "Everyone" if that option is checked. I didn't know that. Thanks.
    I don't run as another user. Would that include other users allowing "everyone" to use their connection?
    I'm not 100% sure I've read you correctly, but if you're asking if...:
    1. ...system wide networks (made by any user) are available for other users to connect to, then yes.
    2. ...any user can create system wide connections, then no. (By default, NetworkManager's policykit configuration restricts modification of system wide connections to admin users only.)

    Originally posted by GreyGeek View Post
    PS- In the systemd logs I posted above, the NetworkManager isn't set up until I log in.
    Well, NetworkManager (the service) clearly starts before you log in, but if you haven't configured a system wide network, it will only connect after you login (because it cannot know which user's network it's supposed to connect to until you have logged in). System networks can be connected to without user login as these are available to all users.

    Originally posted by GreyGeek View Post
    and I don't see any use of nmcli before that.
    nmcli is just a CLI tool you can use to interact with NetworkManager daemon (the service), similar to GUI tools like the plasma-nm applet.

    All the connecting are handled by the NetworkManager service, which has no need to use the cli tool internally. IOW, NetworkManager the service, once it starts, reads it's configuration and connects automatically if it's able and configured to do so. With the nmcli tool you can just interact with the service, if you wish or need to (just like you can with the GUI tools).

    Leave a comment:


  • GreyGeek
    replied
    Originally posted by kubicle View Post
    No, you can use a wifi connection as a system wide network, if you save the network password/secret (if the wifi network is protected) in NetworkManager network settings. NetworkManager has a couple of options on how it saves the data, but the key is that it can use the secret to connect to a network even before a user logs in (provided that it is a system wide connection, of course).
    Ah, the user is in the set "Everyone" if that option is checked. I didn't know that. Thanks.
    I don't run as another user. Would that include other users allowing "everyone" to use their connection?

    PS- In the systemd logs I posted above, the NetworkManager isn't set up until I log in, and I don't see any use of nmcli before that.
    Last edited by GreyGeek; May 31, 2017, 10:10 AM.

    Leave a comment:


  • kubicle
    replied
    Originally posted by GreyGeek View Post
    Wouldn't a "system wide" connection be limited to a wired connection because it doesn't require a login to activate?
    No, you can use a wifi connection as a system wide network, if you save the network password/secret (if the wifi network is protected) in NetworkManager network settings. NetworkManager has a couple of options on how it saves the data, but the key is that it can use the secret to connect to a network even before a user logs in (provided that it is a system wide connection, of course).

    Leave a comment:


  • Erwin Smout
    replied
    Follow-up question. I've applied this (wpa_supplicant approach) on two machines. On one machine, iwconfig tells me it's uisng a 2.6G channel at a bit rate of 1M, on the other, I appear to be using a 5.5G channel at a bit rate of 27M. The band difference is probably due to the capabilities of the wireless adapters involved, but I find the 1M bitrate a bit disappointing (and I vaguely seem to recall having once tried to deliberately slow it down to those speeds because I was experiencing lots of connection dropouts and the like, but I can no longer find where such changes were applied) and sudo iwconfig wlan0 rate auto or rate 11M auto seems not to change anything. Any ideas ?

    Leave a comment:


  • GreyGeek
    replied
    Wouldn't a "system wide" connection be limited to a wired connection because it doesn't require a login to activate? Just plug in the cable and you have a connection, unlike wifi connections.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • kubicle
    replied
    Originally posted by GreyGeek View Post
    I wasn't aware that "Allow all users to use this connection" meant that it established a network connection before/without the NetworkManager loading the user's network configuration file. Until the login name and password was entered how would the NetworkManager know which config file to use?
    NetworkManager supports two types of network connections, system wide networks (available to all users, network configuration stored in /etc/NetworkManager/system-connections/) and user connections (available to specific user, configuration stored under $HOME).

    Only system wide networks can be connected to before login (IOW automatically during boot), user connections (for obvious reasons) can only be connected to after login.

    The setting "Allow all users to use this connection" defines whether that network is a user only or a system wide network.

    Leave a comment:


  • GreyGeek
    replied
    Originally posted by claydoh View Post
    I believe if you go into your connection's settings, you can check the option to have that connection available to all users, which make it connect before login. That is how I have always done it.
    You also specify static addresses, etc from there.
    [ATTACH=CONFIG]7001[/ATTACH][ATTACH=CONFIG]7002[/ATTACH][ATTACH=CONFIG]7003[/ATTACH]
    I wasn't aware that "Allow all users to use this connection" meant that it established a network connection before/without the NetworkManager loading the user's network configuration file. Until the login name and password was entered how would the NetworkManager know which config file to use? If a person configured their account to boot into a bash shell instead of running the GUI desktop they'd still need to configure their network connections the first time they logged in, or at least before they begin using the network. The NetworkManager wait online service completes running just before the login screen appears. It's what the commandline tool, nmcli, communicates with, as I understand it. That's why & how root connects when the user chooses "boot with network" on the recovery menu.

    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Restore /etc/resolv.conf if the system crashed before the ppp link was
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Login Service...
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started System Logging Service.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Permit User Sessions.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Detect the available GPUs and deal with any system changes.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Auto import assertions from block devices.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Restore /etc/resolv.conf if the system crashed before the ppp link was s
    .....
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Authenticate and Authorize Users to Run Privileged Tasks...
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Set console scheme...
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Starting Simple Desktop Display Manager...
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Simple Desktop Display Manager.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Raise network interfaces.
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Set console scheme.
    ...
    May 30 09:37:28 jerry-Aspire-V3-771 systemd[1]: Started Login Service.
    ...
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5341] NetworkManager (version 1.2.6) is starting..
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5354] Read config: /etc/NetworkManager/NetworkMana
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5384] manager[0x217c1c0]: monitoring kernel firmwa
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5385] monitoring ifupdown state file '/run/network
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5397] dns-mgr[0x215b960]: init: dns=dnsmasq, rc-ma
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5405] rfkill0: found WiFi radio killswitch (at /sy
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.5406] rfkill1: found WiFi radio killswitch (at /sy
    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Started Network Manager.
    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Reached target Network.
    ....
    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Starting Network Manager Wait Online...
    ....
    May 30 09:37:29 jerry-Aspire-V3-771 systemd[1]: Starting Network Manager Script Dispatcher Service..
    ...
    May 30 09:37:30 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155050.4490] SettingsPlugin-Ofono: (35308672) ... get_connections.
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/pci0000:00/0000:00:1c.1/0
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] devices added (path: /sys/devices/pci0000:00/0000:00:1c.5/
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/pci0000:00/0000:00:1c.5/0
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] devices added (path: /sys/devices/virtual/net/lo, iface: l
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] device added (path: /sys/devices/virtual/net/lo, iface: lo
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] end _init.
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8306] settings: loaded plugin ifupdown: (C) 2008 Canonical Ltd.
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8307] settings: loaded plugin keyfile: (c) 2007 - 2015 Red Hat,
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8321] SettingsPlugin-Ofono: init!
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <warn> [1496155049.8322] SettingsPlugin-Ofono: file doesn't exist: /var/lib/ofono
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] SettingsPlugin-Ofono: end _init.
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] settings: loaded plugin ofono: (C) 2013-2016 Canonical Ltd
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] (35308448) ... get_connections.
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8322] (35308448) ... get_connections (managed=false): return emp
    May 30 09:37:29 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155049.8561] keyfile: new connection /etc/NetworkManager/system-connect
    ...
    And all the following stuff is happening after I log in:
    ...
    May 30 09:37:31 jerry-Aspire-V3-771 systemd[1]: Starting WPA supplicant...
    May 30 09:37:31 jerry-Aspire-V3-771 dhclient[1249]: DHCPREQUEST of 192.168.1.100 on enp14s0 to 255.255.255.255 port 67 (xid=0x38036cbe)
    May 30 09:37:31 jerry-Aspire-V3-771 dhclient[1249]: DHCPACK of 192.168.1.100 from 192.168.1.1
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] address 192.168.1.100
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] plen 24 (255.255.255.0)
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] gateway 192.168.1.1
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] server identifier 192.168.1.1
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] lease time 86400
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] hostname 'jerry-Aspire-V3-771'
    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: Joining mDNS multicast group on interface enp14s0.IPv4 with address 192.168.1.100.
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6473] nameserver '192.168.1.1'
    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: New relevant interface enp14s0.IPv4 for mDNS.
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6474] domain name 'neb.rr.com'
    May 30 09:37:31 jerry-Aspire-V3-771 avahi-daemon[1016]: Registering new address record for 192.168.1.100 on enp14s0.IPv4.
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6474] dhcp4 (enp14s0): state changed unknown -> bound
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6482] device (enp14s0): state change: ip-config -> ip-check (rea
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6486] device (enp14s0): state change: ip-check -> secondaries (r
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6490] device (enp14s0): state change: secondaries -> activated (
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6491] manager: NetworkManager state is now CONNECTED_LOCAL
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6497] manager: NetworkManager state is now CONNECTED_GLOBAL
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.6498] policy: set 'Wired connection 1' (enp14s0) as default for
    May 30 09:37:31 jerry-Aspire-V3-771 NetworkManager[1094]: <info> [1496155051.7995] dns-plugin[0x218ad00]: starting dnsmasq...



    Leave a comment:


  • GreyGeek
    replied
    Originally posted by wizard10000 View Post
    ... I prefer to use MAC address reservations on the router and assign static IPs there, that way all my IP address management is in one place - the component that's providing DHCP services

    ''''''
    Ditto!

    Leave a comment:


  • claydoh
    replied
    I believe if you go into your connection's settings, you can check the option to have that connection available to all users, which make it connect before login. That is how I have always done it.
    You also specify static addresses, etc from there.
    Click image for larger version

Name:	Screenshot_20170530_211342.png
Views:	1
Size:	126.7 KB
ID:	643519Click image for larger version

Name:	Screenshot_20170530_211523.png
Views:	1
Size:	58.3 KB
ID:	643520Click image for larger version

Name:	Screenshot_20170530_211432.png
Views:	1
Size:	74.4 KB
ID:	643521
    Last edited by claydoh; May 30, 2017, 07:19 PM.

    Leave a comment:


  • wizard10000
    replied
    Originally posted by Erwin Smout View Post
    Okay thanks I'll try and remember this in case I run into problems after all. What should it look like if I want static IP addresses for *both* ipv4 and ipv6 ? (I know about static address ... gateway ... and inet6 but where do I put the wpa clauses in that case, seeing as there appears to be no such thing as "end-static" ?)

    (I've disabled NM altogether now and it doesn't seem to cause problems - if you are aware of any then advising me about them is welcomed.)

    (Whether NM ignores these connection is at least also a function of NM's own Managed=true|false configuration setting.)

    (Bonus question : the *passphrase goes here* would that be the passphrase in plaintext or the obfuscated thing we find in wpa_supplicant.conf ?)
    TBH I never assign static IPs on the machine itself; I prefer to use MAC address reservations on the router and assign static IPs there, that way all my IP address management is in one place - the component that's providing DHCP services

    If you really want to assign static IPs in /etc/network/interfaces you certainly can, this should help - https://wiki.debian.org/NetworkConfiguration

    Bonus question? It's your plaintext passphrase.

    Enjoy!

    Leave a comment:

Working...
X