SMB connection fails after changing to usb wifi

Kernels & Hardware, configuring network, installing services

Re: SMB connection fails after changing to usb wifi

Postby reinob » 2021-02-16 13:45

Thanks @Plfeenstra,

From the looks of it your USB-WIFI connection is being managed by NetworkManager, but only when you are logged on!

Before you login, systemd has already failed to mount the share, as on the one hand it thinks you are online ("Reached target Network is Online"), but Network Manager seems to need time to think and/or who-knows-what that it only manages to connect when you are logged on.

I don't know much about Network Manager, and I would not recommend it for computers that are always online. All you need is wpa_supplicant and systemd-networkd. Oddly, https://wiki.debian.org/WiFi/HowToUse does not even care to explain how to use networkd.

Here (https://hackaday.io/project/162164/instructions) it is more or less well-explained. Let me know if you have problems.
reinob
 
Posts: 900
Joined: 2014-06-30 11:42

Re: SMB connection fails after changing to usb wifi

Postby reinob » 2021-02-16 14:14

I googled a bit about NetworkManager and it seems (thanks for the excellent Arch wiki: https://wiki.archlinux.org/index.php/NetworkManager) that it will only connect when a user has logged on, which for your use-case is absurd.

Connect to network with secret on boot

By default, NetworkManager will not connect to networks requiring a secret automatically on boot. This is because it locks such connections to the user who makes it by default, only connecting after they have logged in. To change this, do the following:

    1. Right click on the nm-applet icon in your panel and select Edit Connections and open the Wireless tab
    2. Select the connection you want to work with and click the Edit button
    3. Check the boxes “Connect Automatically” and “Available to all users”
    4. Additionally, ensure that under "Wi-Fi Security", "Store password for all users (not encrypted)" is selected
Log out and log back in to complete.


So make sure that the connection is marked as "available to all users."
reinob
 
Posts: 900
Joined: 2014-06-30 11:42

Re: SMB connection fails after changing to usb wifi

Postby Head_on_a_Stick » 2021-02-16 19:21

reinob wrote:All you need is wpa_supplicant and systemd-networkd. Oddly, https://wiki.debian.org/WiFi/HowToUse does not even care to explain how to use networkd.

There is a systemd-networkd page in the Debian wiki but it only deals with servers. The ArchWiki page is applicable to Debian though and that isn't riddled with ads & javascript like that atrocious "hackaday" [sic] site :mrgreen:
Black Lives Matter

Debian buster-backports ISO image: for new hardware support
User avatar
Head_on_a_Stick
 
Posts: 13280
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: SMB connection fails after changing to usb wifi

Postby Plfeenstra » 2021-02-19 09:29

Thanks a lot for your replies! I learned a lot. I will try the solution for the networkmanager this weekend and let you know how I proceed.


P
Plfeenstra
 
Posts: 11
Joined: 2021-02-10 08:47

Re: SMB connection fails after changing to usb wifi

Postby Plfeenstra » 2021-02-21 14:26

reinob wrote:I googled a bit about NetworkManager and it seems (thanks for the excellent Arch wiki: https://wiki.archlinux.org/index.php/NetworkManager) that it will only connect when a user has logged on, which for your use-case is absurd.

Connect to network with secret on boot

By default, NetworkManager will not connect to networks requiring a secret automatically on boot. This is because it locks such connections to the user who makes it by default, only connecting after they have logged in. To change this, do the following:

    1. Right click on the nm-applet icon in your panel and select Edit Connections and open the Wireless tab
    2. Select the connection you want to work with and click the Edit button
    3. Check the boxes “Connect Automatically” and “Available to all users”
    4. Additionally, ensure that under "Wi-Fi Security", "Store password for all users (not encrypted)" is selected
Log out and log back in to complete.


So make sure that the connection is marked as "available to all users."


Thank you very much, this solution works perfect for me!
I will study the journalctl -b results; I think I can learn a lot from that. :)

Peter
Plfeenstra
 
Posts: 11
Joined: 2021-02-10 08:47

Previous

Return to System configuration

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable