Page 1 of 2
Saving network signons
Posted: 14 May 2022, 18:00
by Ed_P
With Porteus 4.0 I could save my network signon when signing on with the changes= option by making a module of these files.
Code: Select all
# -- Network files --
# touch /var/lib/dhcpcd/dhcpd.leases
cp -a --parents /etc/NetworkManager/system-connections/* /tmp/mod/
cp -a --parents /var/run/NetworkManager/* /tmp/mod/
cp -a --parents /var/lib/dhcpcd/* /tmp/mod/
cp -a --parents /etc/hosts /tmp/mod/
I could then boot without the changes= option and with the module and be automatically connected to my network.
A module with these files does not work with Porteus 5.0rc. When I boot without the changes= option and with the module I have to signon to my network.
I've booted Porteus 5.0rc in AF mode, signed on to my network and run the changes script to see what's been changed and created new modules with these files.
Code: Select all
# -- Network files --
# touch /var/lib/dhcpcd/dhcpd.leases
cp -a --parents /etc/NetworkManager/system-connections/* /tmp/mod/
cp -a --parents /etc/resolv.conf /tmp/mod/
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/xkb /tmp/mod/
# Porteus 4.0
#cp -a --parents /etc/NetworkManager/system-connections/* /tmp/mod/
#cp -a --parents /var/run/NetworkManager/* /tmp/mod/
cp -a --parents /var/lib/dhcpcd/* /tmp/mod/
cp -a --parents /etc/hosts /tmp/mod/
But every time I boot without the changes= and with the module of the changes shown above I have to signon to my network.
What am I missing???
Saving network signons
Posted: 17 May 2022, 20:38
by babam
You just need /etc/NetworkManager/system-connections/*.nmconnection
Saving network signons
Posted: 17 May 2022, 22:56
by Ed_P
Thanks
babam.
babam wrote: ↑17 May 2022, 20:38
You just need /etc/NetworkManager/system-connections/*.nmconnection
Doesn't this add it to my module??
Ed_P wrote: ↑14 May 2022, 18:00
Code: Select all
cp -a --parents /etc/NetworkManager/system-connections/* /tmp/mod/
Saving network signons
Posted: 18 May 2022, 00:09
by babam
Right-click nm-applet icon --> Edit Connections --> Wireless tab --> YourSSID --> Edit --> General tab:
Check --> "Automatically connect to this network when it is available"
Check --> "All users may connect to this network"
Save
Saving network signons
Posted: 18 May 2022, 06:17
by Ed_P
babam wrote: ↑18 May 2022, 00:09
Check --> "Automatically connect to this network when it is available"
Check --> "All users may connect to this network"
Both connections are configured that way.
Code: Select all
guest@porteus:~$ ls /etc/NetworkManager/system-connections/*.nmconnection
Auto\ Linksys09841-5GHz.nmconnection
Auto\ QuickGoose-pro.nmconnection
guest@porteus:~$ ls /tmp/mod/etc/NetworkManager/system-connections/*.nmconnection
Auto\ Linksys09841-5GHz.nmconnection
Auto\ QuickGoose-pro.nmconnection
The network files are being copied to the module's folder.
Another odd part of this scenario, when I signon to the wifi with the system using the module and not the save.dat file and remake the module, the wifi signons are automatic on future boots with the module.
.
Saving network signons
Posted: 18 May 2022, 10:29
by babam
Do it as root when copying *.nmconnection and creating a module
Saving network signons
Posted: 18 May 2022, 16:09
by Ed_P
babam wrote: ↑18 May 2022, 10:29
Do it as root
Yup. Always.
Code: Select all
if [ `whoami` != "root" ]; then
# echo -e "Enter root's password"
# cyan "Enter root's password"
# su -c "sh $0 $1 $2"
echo toor | sudo -S echo "******"
sudo sh $0 $1 $2
exit
fi
Added in 10 hours 54 minutes 6 seconds:
How is it that the Nemo view of my *.nmconnections on my changes= system show a date of
Fri 18
Mar 2022? Shouldn't the dates be
Wed 18
May 2022?
Actually all the entries in /etc/NetworkManager/system-connections/ folder show the
Mar date.
On the system without the changes= option and with the module the /etc/NetworkManager/system-connections/ folder shows all the same entries with the Mar date but also an .nmconnection entry with the current date.
Code: Select all
ls -lght /etc/NetworkManager/system-connections/*.nmconnection
-rw------- 1 root 358 May 18 15:57 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro-94ef9d48-5ada-4280-806f-544e8755624b.nmconnection
-rw------- 1 root 364 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ Linksys08941-5GHz.nmconnection
-rw------- 1 root 358 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro.nmconnection
Saving network signons
Posted: 19 May 2022, 08:27
by babam
How about md5sum or compare with diff?
Saving network signons
Posted: 19 May 2022, 14:54
by Ed_P
babam wrote: ↑19 May 2022, 08:27
How about md5sum or compare with diff?
Added in 21 minutes 28 seconds:
Code: Select all
guest@porteus:/etc/NetworkManager/system-connections$ su
Password:
root@porteus:/etc/NetworkManager/system-connections# diff *-pro.nm* *-pro-94*
3c3
< uuid=42cb3a60-f81b-489a-854f-244087b884dc
---
> uuid=94ef9d48-5ada-4280-806f-544e8755624b
5c5
< interface-name=wlan1
---
> interface-name=wlan0
The main question is; why? Same notebook, same OS, same modules, same network, same router. Something is in my save.dat file that isn't in my module.
Added in 1 day 11 hours 51 minutes 6 seconds:
So, for the changes= system I was able to pull up root's terminal history which shows a fair amount to network activity.
Code: Select all
cd /etc/rc.d
./rc.local_shutdown
./rc.local_shutdown
cd /etc/rc.d
./rc.local_shutdown
chmod +x *.sh
startx
boot
exut
reboot
xpsinfo
exit
parted 50rc3save.dat p
parted 50rc3save.dat p
ls -l 50rc3*
ls -lh 50rc3*
whereis pysol.*
rm /mnt/live/memory/images/changes/root/.local/share/gvfs-metadata/.wh.root-*.log
DBus
service
keycode
showkey d
showkey -a d
showkey -a
./live-usb
iwlist scan
e4defrag
e2fsprogs
xpsinfo
fsck.ext2 -v
fsck.ext2 -V
ls -o /usr/sbin/NetworkManager
list disk
rm -rf /mnt/live/memory/images/changes/home/guest/.cache/mozilla/firefox/dxsqumip.default
modinfo -F firmware
/usr/lib/modules/5.15.1-rc7-porteus/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
/usr/lib/modules/5.15.1*
modinfo -F firmware /usr/lib/modules/5.15.1-rc7-porteus/kernel/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko
modinfo -F firmware /usr/lib/modules/5.15.1*
cd /etc/
find . -maxdepth 3 -type f -exec grep -n "BOOTDEV" "{}" \;
find . -maxdepth 3 -type f -exec grep -l "BOOTDEV" "{}" \;
find . -maxdepth 3 -type f -exec grep -ln "BOOTDEV" "{}" \;
find . -maxdepth 3 -type f -exec grep -l -n "BOOTDEV" "{}" \;
find . -maxdepth 3 -type f -exec grep -nr "BOOTDEV" "{}" \;
find . -maxdepth 3 -type f -exec grep -lnr "BOOTDEV" "{}" \;
rm /mnt/live/memory/images/changes/etc/NetworkManager/system-connections/.wh.*
rm /mnt/live/memory/images/changes/root/.local/share/gvfs-metadata/.wh.root-*.log
touch /var/lib/dhcpcd/dhcpd.leases
touch /var/lib/dhcpcd/dhcpd.leases
touch /var/lib/dhcpcd/dhcpd.leases
touch /var/lib/dhcpcd/dhcpd.leases
touch /var/run/NetworkManager/*
touch /var/lib/NetworkManager/*
touch /var/lib/dhcpcd/*
touch /etc/resolv.conf
touch /etc/hosts
touch /etc/NetworkManager/system-connections/*
gconf-editor
gnome_settings_daemon
gsettings
gsettings get org.gnome.settings-daemon.plugins.housekeeping free-size-gb-no-notify
dconf-editor
gsettings get org.cinnamon.settings-daemon.plugins.housekeeping free-size-gb-no-notify
dconf-editor
But unfortunately I don't remember what I did to pull it so I can't do it for the modules system.
I can pull up the .bash_history for guest but not for root. And guest's history is hugh, for a freshly booted system, is there a command to delete old history?
Saving network signons
Posted: 21 May 2022, 03:52
by ncmprhnsbl
Ed_P wrote: ↑21 May 2022, 03:06
And guest's history is hugh, for a freshly booted system, is there a command to delete old history?
should clear it..
EDIT: history -c clears the present shell history buffer and history -w writes that 'cleared' history to the .bash_history file...
or maybe just
i imagine just deleting ~/.bash_history would do it too.. (it should be automatically remade on next bash login)
Saving network signons
Posted: 21 May 2022, 05:01
by Ed_P
Thanks
ncmp. Some problems using history.
Code: Select all
guest@porteus:~$ history
1 .bash_history
2 find .bash_history
3 cat .bash_history
4 su
5 history
guest@porteus:~$ su
Password:
root@porteus:/home/guest# history .bash_history
bash: history: .bash_history: numeric argument required
root@porteus:/home/guest# find .bash_history
.bash_history
root@porteus:/home/guest# cat .bash_history
.bash_history
find .bash_history
cat .bash_history
su
root@porteus:/home/guest# history cat .bash_history
bash: history: cat: numeric argument required
root@porteus:/home/guest#
root@porteus:/home/guest# cd ..
root@porteus:/home# cd ..
root@porteus:/# cat .bash_history
cat: .bash_history: No such file or directory
root@porteus:/#
Saving network signons
Posted: 21 May 2022, 07:52
by ncmprhnsbl
Ed_P wrote: ↑21 May 2022, 05:01
Some problems using history.
not sure what you're trying to do .... note if you're after root's bash history, it's /root/.bash_history (or simply "history" as root)
since history is a bash 'builtin'
gives some usage info..
i edited the previous post with some corrected commands for clearing the .bash_history file..
Saving network signons
Posted: 21 May 2022, 15:01
by Ed_P
I've figured out where the .bash_history files are located.
Code: Select all
guest@porteus:~$ echo $HISTFILE
/home/guest/.bash_history
guest@porteus:~$ su
Password:
root@porteus:/home/guest# echo $HISTFILE
/root/.bash_history
root@porteus:/home/guest#
And "history" without arguments displays the current window's session history with sequence numbers in front of it!
Saving network signons
Posted: 22 May 2022, 06:26
by donald
I made an entry in my .bash_history file to clear it from time to time.
> ~/.bash_history
Code: Select all
guest@porteus:~$ > ~/.bash_history
Saving network signons
Posted: 23 May 2022, 06:09
by Ed_P
Ok, thank you guys, both .bash_history files have been cleaned out. And we are back to the topic of this thread, what files do I have to save to my module to have the wifi connections connect?
Interesting to note that the wifi connection with the long name has a different name today than the one posted previously.
Code: Select all
guest@porteus:~$ ls -lght /etc/NetworkManager/system-connections/*.nmconnection
-rw------- 1 root 358 May 23 02:05 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro-f60c26a2-ce15-4d78-93f3-3fdb0d2db3d4.nmconnection
-rw------- 1 root 364 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ Linksys08941-5GHz.nmconnection
-rw------- 1 root 358 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro.nmconnection
guest@porteus:~$
Added in 6 minutes 41 seconds:
Ed_P wrote: ↑19 May 2022, 03:03
Code: Select all
ls -lght /etc/NetworkManager/system-connections/*.nmconnection
-rw------- 1 root 358 May 18 15:57 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro-94ef9d48-5ada-4280-806f-544e8755624b.nmconnection
-rw------- 1 root 364 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ Linksys08941-5GHz.nmconnection
-rw------- 1 root 358 Mar 18 01:36 /etc/NetworkManager/system-connections/Auto\ QuickGoose-pro.nmconnection