How can I prevent users from encrypting their home folder on a server inside our company without removing the respective packages?
Are there any policies I can enable to prevent this?
Edit: the reason is that employees leaving should not leave data behind in encrypted form on this machine. They have the opportunity to use encryption on their personal workstation to some extent. Those users do not have super user powers.
If you don't want to remove the
ecryptfs-utils
package, then the easiest way to do this would be to remove the setuid bit on/sbin/mount.ecryptfs_private
.You should use a dpkg state override to make this setting persistent, like so:
This will ensure that
ecryptfs-setup-private
andecryptfs-mount-private
fail with an EPERM error for non-root users.If this becomes a popular request, we could easily add this as a debconf question/option in the package.