hardening
hardening copied to clipboard
Login Loop
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.
- Spin up a VM on HyperV with Ubuntu 22.04.
- Execute the script.
- 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
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?
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.
There's no log created by default, but in ubuntu.cfg
change VERBOSE
to VERBOSE='Y'
and run sudo bash -x ubuntu.sh &>logfilename
Will try it out over the weekend and keep you posted.
Closing this out, the issue was fixed by upgrading Hyper-V patches it seems.
Unable to reconstruct the issue. Will reopen if needed be.