Special Agent Bob · 2020-10-28 11:31
How to change sudo to a random password and have it revert back to normal after a couple hours?
I remember a long time ago when I was first getting into linux I found a tool that did exactly what I described in the first sentence above. I was looking for ways to fix my procrastination, blocking in /etc/hosts, or using iptables to block websites. But I was always able to revert the solutions just by using sudo.
So I found this tool that changed your sudo pwd for a certain amount of time, but since I wasn't that experienced with linux I didn't want to mess with such a thing and risk screwing up. Now I know better, how easy it is to just change your pwd by logging in with a live USB, for example, if your harddrive isn't encrypted.
So does anyone know what tool I'm referring to? It was really hackish if I remember correctly, I'm also interested in any ideas people might have on how to achieve this random sudo password with a reset feature time limit.
Use case: want to read books for a couple hours. Iterates through my list of blocked domains into iptables, changes sudo pwd so I can't revert the iptables. Reverts my pwd back to normal after X hours.
OP · 2020-10-28 11:35
I am pretty sure I'd know how to do this already, but it would be really hackish. I'm wondering if there's some intelligent solutions out there.
And once I figure this out I'm going to re-install my OS and encrypt it so my live USB method isn't capable of circumventing it anymore.
I found it's really effective to fully block the websites for a couple hours and actually do some work. When you know they're inaccessible you don't even think about them anymore really. There isn't a gnawing feeling to "check the latest" and get that dopamine fix.
And yeah, my self control is soykaf, I know...
OP · 2020-10-28 11:43
Another thing I have to solve is to deal with the computer shutting down or being off when the pwd reset is supposed to occur.
I can't have it just reset back to normal when the machine starts up, because that would be easy to circumvent the block. You just restart the machine.
And if anyone else is interested in applying something like this to their own machine to increase their productivity, let me know so I know to post my own solutions as I come up with them.
Chan Siu Ming · 2020-10-28 18:49
The problem is you.
Just nuke the boot partition or take your book with you and move anywhere far from your pc.
OP · 2020-10-28 21:53
Found something that accomplishes this.
https://github.com/miheerdew/delayed-admin
There are tons of little scripts to deal with procrastination that I found while searching, but they all depend on easily circumvented things like /etc/hosts which is lame.
Something like delayed-admin would actually help.
It's employing an interesting technique too, it delays rather than outright blocks. So you can "meditate" on the action you were going to take so you can't impulsively take it.
>This is where Delayed Admin would help. Anand only retains a delayed administrator access so that he can still do the routine system update or any other administrator stuff that he wants, but only after waiting for 20 minutes. Basically, this deters him from taking administator actions at whim, allowing only for deliberate ones.
Ivan Petrov · 2020-10-28 22:19
>>35259
Any fans of this book would find the in-depth minimalism followup useful >>>/tech/33397