Secure /etc/fstab in Linux

Its best to secure /etc/fstab as it contains all the mount locations and can lead to boot issues if any novice person tinkers/plays around with it. The secure mode can only be enabled /disabled by root user only and completely secure. There is a simple one line command for that as given.

# chattr +i /etc/fstab

Now if you try to edit /etc/fstab it would give you this message

"/etc/fstab"
"/etc/fstab" E212: Can't open file for writing
Press ENTER or type command to continue

To turn off the security on it run this command

# chattr -i /etc/fstab

If you encounter any errors during the process, let us know via Contact Us and will get it resolved promptly.

Linux Related Articles . . .

To generate a SHA256 certficate in linux all you need to do is run this openssl command and you will...
This a very useful One liner command to insert IP and hostname into /etc/hosts file and is particularly useful when...
Its possible to use awk in Alias command. I did that by simply just modifying some parenthesis and there you...
Its possible to run a script via Alias command. All you need is to modify the .bashrc and then source...
This article will guide you on creating a custom Self-signed SSL Certificate in no time. For creating one you would...