Page 1 of 1

wifi module

Posted: 15 Feb 2022, 19:39
by Ed_P
I'm trying to make a module that I can run when I'm not in an update mode. And while the network part works the wifi password does not. Each time I boot I have to connect to the wifi by entering the password. What am I missing? :wall:

Code: Select all

#                  -- Network files --
#                  touch /var/lib/dhcpcd/dhcpd.leases
cp -a --parents    /var/run/NetworkManager/*                      /tmp/mod/
cp -a --parents    /var/run/syslogd.cache                         /tmp/mod/
cp -a --parents    /var/lib/NetworkManager/*                      /tmp/mod/
cp -a --parents    /var/lib/dhcpcd/*                              /tmp/mod/
cp -a --parents    /etc/resolv.conf                               /tmp/mod/
cp -a --parents    /etc/NetworkManager/system-connections/*       /tmp/mod/
cp -a --parents    /etc/hosts                                     /tmp/mod/

wifi module

Posted: 15 Feb 2022, 21:36
by beny
Ed_P ,you have a file with your wifi configuration and the password that you do not put in because is into the configure in /etc/NetworkManager/system-connections/ i think that networkmanager do this config file,and if you have the start at boot time do not need to put password,well in my system i have automatic wifi connection without the password prompt, try if you have the right configure.

wifi module

Posted: 16 Feb 2022, 03:10
by Rava
Ed_P wrote:
15 Feb 2022, 19:39
Each time I boot I have to connect to the wifi by entering the password. What am I missing?
Have you looked into the file NetworkManager creates that holds the password?

It is quite unlikely, but possible that it contains some info about the current running NM, e.g. its PID that would not work for another process.

If not, maybe stackoverflow or one of its sister sites has already a question similar to yours and so has the answer.

wifi module

Posted: 16 Feb 2022, 05:06
by Ed_P
I do indeed include all the various NetworkManager folders, /var/run/'s /var/lib/'s and /etc/'s. But when I boot and want to connect to the wifi I have to choose a network and enter it's password. And the module is created after I've already done the connection and password steps. Something is missing.

wifi module

Posted: 27 Feb 2022, 11:29
by Testuser
Hi Ed_P,

This was an issue for me as well.

After working lot of hours, I found in for me permission of folders was not correct.

I opened PCmanFM as root while copying and creating XZM files (I beleive we can also do this in Chroot mode - sorry I am not so familiar with that).

Please check I beleive all etc folders /var/lib folders have be root as owners.

For me it worked after getting right permission.

Now on every fresh boot also networking and WIfi will autoconnect.

Hope this helps. :)