ubuntu - How to prevent user from removing lines from a file ( so he could only add lines,never remove) -
i'm trying fight bad habit of wasting time on time-consuming websites such reddit/liveleak etc.
the thing seems work adding line etc/hosts 127.0.1.1 www.reddit.com
it works few days when got nothing edit file , remove line , start wasting life again.
is way make etc/hosts file immune changes delete ? (so able add things when stumble upon website think potential threat time)
it perfect if way delete hosts's immunity deleting lines installing system once again,because wouldnt browse reddit.
it important me , extremely grateful help.
do chmod 644 /etc/hosts
on file , chmod root:root /etc/hosts
. remove account sudoers
file. ask else change root password
not know it.
keep in mind can control not other way. way might face problems in other tasks require root privileges.
Comments
Post a Comment