How to Install and Uninstall molly-guard Package on Ubuntu 16.04 LTS (Xenial Xerus)

Last updated: May 11,2024

1. Install "molly-guard" package

Here is a brief guide to show you how to install molly-guard on Ubuntu 16.04 LTS (Xenial Xerus)

$ sudo apt update $ sudo apt install molly-guard

2. Uninstall "molly-guard" package

This guide let you learn how to uninstall molly-guard on Ubuntu 16.04 LTS (Xenial Xerus):

$ sudo apt remove molly-guard $ sudo apt autoclean && sudo apt autoremove

3. Information about the molly-guard package on Ubuntu 16.04 LTS (Xenial Xerus)

Package: molly-guard
Priority: extra
Section: universe/admin
Installed-Size: 56
Maintainer: Ubuntu Developers
Original-Maintainer: Francois Marier
Architecture: all
Version: 0.6.3
Depends: procps
Filename: pool/universe/m/molly-guard/molly-guard_0.6.3_all.deb
Size: 12682
MD5sum: c67d3cdc62be429fb0eb9937ad34563d
SHA1: 351f2396ebf3f3ebeb0311ccda4f8f8d7ad9ca16
SHA256: b63754e6be81f2ea8f98d37fa61fdf510122812e4f084613743cc1692a303db4
Description-en: protects machines from accidental shutdowns/reboots
The package installs a shell script that overrides the existing
shutdown/reboot/halt/poweroff/coldreboot/pm-hibernate/pm-suspend* commands
and first runs a set of scripts, which all have to exit successfully,
before molly-guard invokes the real command.
.
One of the scripts checks for existing SSH sessions. If any of the four
commands are called interactively over an SSH session, the shell script
prompts you to enter the name of the host you wish to shut down. This should
adequately prevent you from accidental shutdowns and reboots.
.
molly-guard diverts the real binaries to /lib/molly-guard/. You can bypass
molly-guard by running those binaries directly.
Description-md5: 9027b495eb885926ceab360590ed53b7
Enhances: init, kexec-tools, mosh, openssh-server, pm-utils, systemd, sysvinit, upstart
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu