hardening icon indicating copy to clipboard operation
hardening copied to clipboard

Login Loop

Open w33ha-zxc opened this issue 1 year ago • 4 comments

Hi @konstruktoid,

Executing the hardening procedure deletes the home directories for all the users on the system causing loops at the login window.

To Reproduce - This issue seems to impact VMs created on HyperV, worked fine with Vmware Workstation.

  1. Spin up a VM on HyperV with Ubuntu 22.04.
  2. Execute the script.
  3. Reboot the server.

executing mkhomedir_helper from recovery mode fixes the issue

HyperV Version: 10.0.17763.1 Replicated for both Ubuntu 20.04 LTS and Ubuntu 22.04 LTS OS

image

image

w33ha-zxc avatar Aug 11 '22 07:08 w33ha-zxc

Hi again @w33ha-zxc, I got no idea why a Ubuntu VM is different on Hyper-V than on AWS, VirtualBox or Workstation. Did you use an official ISO?

I'll have to find a way to run Hyper-V and then try to debug this.

Can you get some kind of log when the accounts actually gets removed?

konstruktoid avatar Aug 11 '22 08:08 konstruktoid

Hi @konstruktoid,

I was wondering the same.

I indeed downloaded the ISO twice from the official source, checked checksum just to double check.

Does the hardening script generate a log somewhere I can look at ? or else what I could do is re setup the VM, configure the auditd beforehand and then try executing the script for detailed logging on the actions the script performs.

w33ha-zxc avatar Aug 16 '22 07:08 w33ha-zxc

There's no log created by default, but in ubuntu.cfg change VERBOSE to VERBOSE='Y' and run sudo bash -x ubuntu.sh &>logfilename

konstruktoid avatar Aug 16 '22 08:08 konstruktoid

Will try it out over the weekend and keep you posted.

w33ha-zxc avatar Aug 19 '22 13:08 w33ha-zxc

Closing this out, the issue was fixed by upgrading Hyper-V patches it seems.

Unable to reconstruct the issue. Will reopen if needed be.

w33ha-zxc avatar Sep 25 '22 15:09 w33ha-zxc