Two quirks with personal snapshots

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Post Reply
Message
Author
User avatar
m_pav
Developer
Posts: 1390
Joined: Sun Aug 06, 2006 3:02 pm

Two quirks with personal snapshots

#1 Post by m_pav »

Quirk # 1 came through GUFW - Warning: / is globally writable by all users and groups (shortened version) Here's the procedure which led me to the finding.

I'm posting in the MX modified because I upgraded my boys modified MX-14, to MX-16 I using a snapshot made earlier today with all updates etc installed, plus a handful of tools to assist his schooling. Being lazy, I chose not to back up data and reformat his 64GB SSD, instead I moved a few folders containing his school work to another location in /home, deleted the remainder of his user account and performed the install instructing it to keep /home, so the drive retained its original formatting

My surprise came when I enabled on the firewall on the new install and tried to set exclusions for samba, GUFW failed to make any rules and reported the error listed above, so I proceeded to check with ls -ld / and sure enough, it was exactly as the message said

Code: Select all

$ ls -ld /
drwxrwxrwx 19 root root
Man did I get a wake up!. A bit of googling turned up a few posts about some bugs, but these were from 2-5 years ago, so I ignored them and went looking for further confirmation because I had done things a little differently in the first place.

I rebooted his NUC with my Live-USB, mounted his / partition and its name was listed under media/ using the partitions UUID, so I was able to check and sure enough, it was drwxrwxrwx when mounted. I chmodded the device listed with the UUID to drwxr-xr-x, rebooted normally and low and behold, the rules I tried unsuccessfully to add to GUFW were in place and working, Re-checking with ls -ld / confirmed the permissions were set right.

I don't believe this is a normal scenario, though this does beg the question, should our installer check the drives permissions and correct them if they are found to be in error during install when a choice is made to retain /home ????? Thoughts anyone?

Quirk #2 was discovered after I installed a different snapshot created yesterday to another machine and set the user to log in automatically. Upon first boot, instead of arriving at a desktop, I was left with a blank screen. I switched to VT1 and issued the reboot command, only to be met at next boot by the same thing. This time, I used Crtl + Alt + Esc to kill X and was presented with a login screen containing the login username from the machine I used to create the snapshot.

To me, this one begs a little more digging because I think I may have stumbled upon a bug and I wonder if others can reproduce it.

The process is simple, make a general snapshot, then boot and install said snapshot to a VM or another machine. Ensure you use a different user name to that which was used when creating the snapshot and set the user to autologin. Secondly, make sure you do not select the option to copy over live desktop changes. If, like me, you're faced with a black screen and not much else, kill X with the 3 finger salute and see if you're presented with the username from the originating machine.
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD FX 6100 CPU, nVidia, 8Gb, 3.25TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

User avatar
anticapitalista
Developer
Posts: 4160
Joined: Sat Jul 15, 2006 10:40 am

Re: Two quirks with personal snapshots

#2 Post by anticapitalista »

A general snapshot should set the user as demo. Or are you talking about a general snapshot of a previous personal snapshot?
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: Two quirks with personal snapshots

#3 Post by Adrian »

If you do a general snapshot lightdm.conf should be overwritten with a default one (which is in /usr/local/share/live-files/general-files/etc/lightdm) that should have this line:

Code: Select all

autologin-user=demo
Can you check if that's the case? If you do personal snapshot then it should use your lightdm.conf.

Then the installer does this:

Code: Select all

    replaceStringInFile("demo", userNameEdit->text(), "/mnt/antiX/etc/lightdm/lightdm.conf");
    if (autologinCheckBox->isChecked()) {
        replaceStringInFile("#auto_login", "auto_login", "/mnt/antiX/etc/slim.conf");
    }
    else {
        replaceStringInFile("autologin-user=", "#autologin-user=", "/mnt/antiX/etc/lightdm/lightdm.conf");
    }
It replaced that "demo" account with whatever account you create and then comments the autologin out unless you check the autologin checkbox.
Wait... why is editing /etc/slim.conf if you check the autologin instead of /etc/lightdm/lightdm.conf? It's possible that we have that slim.conf line for antiX installation, still not sure why it would show the old user account.

User avatar
m_pav
Developer
Posts: 1390
Joined: Sun Aug 06, 2006 3:02 pm

Re: Two quirks with personal snapshots

#4 Post by m_pav »

Will answer as soon as I can, at work now. I think Anticapitalists might have hit the nail on the head, and Adrian has some good points too.
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD FX 6100 CPU, nVidia, 8Gb, 3.25TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: Two quirks with personal snapshots

#5 Post by skidoo »

m_pav, does the system you're installing contain multiple user accounts?

Adrian, this report by m_pav sounds itentical to a bug report I had submitted during betatesting.
When I performed an install from a liveboot system containing 2 user accounts, my "preserve accounts" selection seemed to be ignored ~~ I wound up with a single user account (named "demo") in the resulting installed system.

BTW, this text (presented during installation) is unclear:
tr("Would you like to save the old home directory\nand create a new home directory?")
? should it read save _or_ create new?
As is, it's unclear what will happen if I choose "yes". Unclear what will happen if I choose "no".

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: Two quirks with personal snapshots

#6 Post by Adrian »

It's unclear by itself, but in the sequence it should guide you pretty well:

Code: Select all

1. The home directory for %1 already exists.Would you like to reuse the old home directory?
2. Would you like to save the old home directory\nand create a new home directory?
3. Would you like to delete the old home directory for %1
So if you said "no" at the first question it asks you a 2. if you want to reuse the old home directory by creating a new home directory (here "and" is absolutely correct, but for clarification we could probably change it like I worded "by creating" instead of "and create"), then if you don't want to do that it asks at 3. if you want to delete the old home or not.

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: Two quirks with personal snapshots

#7 Post by Adrian »

When I performed an install from a liveboot system containing 2 user accounts, my "preserve accounts" selection seemed to be ignored ~~ I wound up with a single user account (named "demo") in the resulting installed system.
The installer was not designed initially to install multiple accounts and to handle backed up accounts, all of the stuff was added later on so there might be an error somewhere, what I added was this check if there's another user except demo or snapshot or if the demo is present on /live/linux then skip the account creation and just copy the accounts without going through demo renaming and without asking for new passwords (presumably you already set up passwords when you created the accounts).

Code: Select all

// Detect snapshot-backup account(s)
// test if there's another user than demo in /home, if exists, copy the /home and skip to next step, also skip account setup if demo is present on squashfs
        if (system("ls /home | grep -v lost+found | grep -v demo | grep -v snapshot | grep -q [a-zA-Z0-9]") == 0 || system("test -d /live/linux/home/demo") == 0) {
That's why you see a demo account on the installed system, not sure though why the other preserved account is not showing up.

I'm a bit confused by the multitude of options and where the problem appeared, did your preserved accounts work on the live media -- is it a snapshot issue or an installation issue? Did you also have a "demo" account? I will have to do a bit more testing for this option, personally I was more interested in the "reset accounts" option because that's what I use for Monthly Snapshots, so I probably gave that more attention and testing than to the "preserve accounts" option. Also combining account preservation with persistence settings might create some corner cases that we didn't think about.

skidoo
Posts: 753
Joined: Tue Sep 22, 2015 6:56 pm

Re: Two quirks with personal snapshots

#8 Post by skidoo »

not sure though why the other preserved account is not showing up.
Ok. At seeing m_pav describing here what may be the same issue, I just wondered whether an older, pre-patched version of the installer got shipped in MX16.

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: Two quirks with personal snapshots

#9 Post by Adrian »

There are always fixes, before taking a snapshot and installing it's better to do a update to make sure you have the latest installer and mx-snapshot. I will have to do some extra testing though for that scenario.

Charley
Posts: 5
Joined: Sat May 06, 2017 9:55 am

Re: Two quirks with personal snapshots

#10 Post by Charley »

For some reason I had no issues. I installed the distribution latest snapshot on this machine, added all the current updates and the programs I needed for the target machine. Then took the snapshot. I installed it in V BOX on my Manjaro install and it worked perfectly. I used it on this machine for almost a week before I did that. After the testing I wrote the snapshot to a USB key and installed it on the (used) system I bought for my church.
Dell OptiPlex 790 Desktop PC - Intel Core i3-2130 3.4GHz 4GB 250GB DVDRW
I did it that way so I could install the latest version of OpenLP from Debian Testing (version 2.4) since the one in the repositories doesn't work all that well. Used it for a Mother's Day Presentation yesterday and it worked perfectly.
This is as good as a Distribution gets. 16 second cold boot on that Dell and it seems bulletproof. The person running the program was a Linux neophyte, not a worry in the world. I think she's in love. :happy:
Thanks to the developers!
Registered User # 566774
https://linuxcounter.net
Phenom II 2.1 Ghz Triple Core
WD Black Series 320 & 500 GB
Broadcom wireless
Always :needcoffee:

Post Reply

Return to “MX Modified”