Hello,

I am looking for a program that can force me to stop using Linux when I need to do something else, like eating dinner or going to bed.

This time enforcement could be as simple as changing the user password and then logging me out at a certain time (of course it should also change the password back later)

It should also require a password (different from the user password) to change its settings or uninstall it, so that I can't tamper with it in a weak moment.

Is there such a program for Linux?

you are viewing a single comment's thread
view the rest of the comments
[–] 1 point 3 months ago (6 children)

You could break your system, but maybe a pam module could make your username/pass not work during particular times.

  • source
  • hideshow 6 child comments
  • [–] [S] 1 point 2 months ago (5 children)

    How likely is it to break the system with it?

  • source
  • parent
  • hideshow 5 child comments
  • [–] 1 point 2 months ago (4 children)

    1 pam configuration mistake or one programming mistake in it. However if you can comfortably boot a live usb and fix it, and test it in qemu it should be no problem.

    Oh look like pam_time exists..

    https://askubuntu.com/questions/631569/pre-scheduled-daily-lock-out-periods

    https://linux.die.net/man/8/pam_time

    https://linux.die.net/man/5/time.conf

    Seems minimal enough.

  • source
  • parent
  • hideshow 4 child comments
  • [–] [S] 1 point 2 months ago (3 children)

    Thank you,

    Is there some CLI/GUI implementation of this where I don't have to write all the configs and other stuff my self and maybe make mistakes?

  • source
  • parent
  • hideshow 3 child comments
  • [–] 1 point 1 month ago (2 children)

    Back when I started out I wanted something similar I used webmin (I think it was) which is a perl webserver interface for linux configuration. There are a couple issues with gui/tui based solutions:

    1. Config files can be very expressive, and it's hard to make a data structure and a ui which matches it, which causes it to clobber comments and extra config options you turn on (the comments help a lot with config files)
    2. They can be very out of date, and break your config unless you're aware of the differences in version
    3. Webmin was the source of many security vulnerabilities
    4. They actively prevent learning - config files are a bandaid, although pam, like selinux, fstab, crypttab are painful ones to make a mistake in but the good news is often fixing them is booting into a live cd and changing it, so make backups.

    Along with webmin tuis were popular for config too in a similar way. IDK if redhat still does it but there were a bunch similar to nmtui.

    I don't think that this one is particular complex to write. But you might run into other issues. Let us know if it's on your system etc. Look in /lib/security/ to see if you have the pam_time.so installed. Might be the first place to go.

  • source
  • parent
  • hideshow 2 child comments
  • [–] [S] 2 points 1 month ago (1 child)

    config files are a bandaid Sorry I am a bit confused, are you want me to use the config files or not?

    They actively prevent learning - config files are a bandaid, although pam, like selinux, fstab, crypttab are painful ones to make a mistake in but the good news is often fixing them is booting into a live cd and changing it, so make backups.

    My goal is to get my life in order, not to become a half sysadmin. So I want the safest and most reliable solution to solve my problems

  • source
  • parent
  • hideshow 1 child comment