Commit Graph
13 Commits
Author SHA1 Message Date
Dante Catalfamo 3e06ca21d9 Delete duplicate linux lock/wipe scripts (#25611)
#22544

The Linux wipe/lock scripts have lived as duplicated in two locations
for a long time. This removes the copy that isn't used.

The remaining scripts in the `ee/server/service/embedded_scripts` folder
are pulled in here.

https://github.com/fleetdm/fleet/blob/12d8017ff905555feb0053e7a09eded404b5e8f1/ee/server/service/hosts.go#L499-L508

It looks like the `wipe` script in `scripts/mdm/linux` was even slightly
out of date compared with the one in the `ee/` folder.
2025-01-22 10:46:59 -05:00
Dante Catalfamo 3604a9abf8 Add reboot to linux unlock script (#23382)
#22437

There is a bug in Ubuntu 24.04's distribution of GDM that prevents it
from starting correctly and displaying a prompt to the user if
`/etc/nologin` is present. This issue is not present on the current
release of Fedora, meaning it is Ubuntu specific.

The way we lock users out is by manually creating the `nologin` file and
then masking the `systemd-user-sessions` systemd unit, which creates the
file on shutdown and deletes it on startup. This will cause a PAM policy
to fail and prevents anyone from logging in. When we unlock the system
we delete the `nologin` file, unmask the `systemd-user-sessions` unit,
and manually run the binary that it should start.

This process removes the cause of the GDM bug, but we need to reboot the
machine to get GDM working again.

While I have not yet been able to determine the exact cause of the bug,
this fix will prevent the user from being stuck with a black screen once
the machine is unlocked.

This fix will not remedy GDM showing a black screen upon being locked,
it only ensures that the user isn't stuck having to manually reboot the
machine once it's unlocked.

We should check back on this soon to see if the bug gets been fixed
upstream.
2024-11-11 14:22:22 -05:00
Dante Catalfamo feb32a274a Linux Mask systemd-user-sessions (#20877)
#20370

Part 2 to #20699. Apparently `systemd` now automatically deletes
`/etc/nologin` on startup. In the previous PR, rebooting the machine
would remove the nologin file and allow users to login. This PR masks
the service that performs the deletion, preventing it from running.

The message displayed to the user will be what is specified in [this
file](https://github.com/systemd/systemd/blob/7767896d127264f660e1e8a714e5cd760840921f/tmpfiles.d/systemd-nologin.conf#L10).
It's not the best, but I suspect messing with too many systemd files
could come back to bite us in the future if things change, so I'll leave
it as-is.
2024-08-01 10:27:17 -04:00
Dante Catalfamo 6094bb2c53 Use PAM nologin to disable Linux Logins (#20699)
#20370
2024-07-29 10:00:48 -04:00
Dante Catalfamo 5413f8d2b2 Windows locking script was missing from embedded script (#20427)
As part of this PR #20224, I added the new script to one location but
didn't notice that it wasn't included in the embedded scripts directory.

This also adds an unlock script that will reset the registry values to
their original settings
2024-07-18 11:50:12 -04:00
Dante Catalfamo 31880442c9 Disable cached logins and reboot on Windows lock (#20224)
#20080
2024-07-04 13:53:59 -04:00
Martin Angers ff1e17680b Fix the unlock linux host script to support users without password (#19665) 2024-06-12 09:49:37 -04:00
Martin Angers 943a4566f4 Fix the windows-remove-fleetd.ps1 script so that the agent can be reinstalled (#19643) 2024-06-12 09:34:57 -04:00
Dante Catalfamo 9b3d6e590d Linux Wipe Async (#18372)
#18173

Creates a detached child shell process to wipe the host. This lets the
main shell script return and tells the server the command has completed,
clearing it from the run queue.

Now shuts the host down after being wiped instead of leaving it running
without files like a zombie
2024-04-29 09:55:05 -04:00
Luke Heath 877cc4d8fd Windows removal script (#16172) 2024-01-23 10:43:31 -06:00
Luke Heath 7a1797f621 Linux and Windows MDM scripts (#15501) 2023-12-12 14:52:27 -06:00
Luke Heath 47e8e57d5a Revert "Add Windows scripts and set scripts table width" (#15590) 2023-12-12 12:20:41 -06:00
Luke Heath 8c548afe31 Add Windows scripts and set scripts table width 2023-12-12 12:04:23 -06:00