this post was submitted on 21 Aug 2026
77 points (96.4% liked)
linuxmemes
32556 readers
1004 users here now
Hint: :q!
Sister communities:
Community rules (click to expand)
1. Follow the site-wide rules
- Instance-wide TOS: https://legal.lemmy.world/tos/
- Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
- Understand the difference between a joke and an insult.
- Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
- Don't get baited into back-and-forth insults. We are not animals.
- Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
- Bigotry of any kind will not be tolerated. This is an LGBTQ+-friendly community -- if that is a problem for you, you should leave.
3. Post Linux-related content
- Including Unix and BSD.
- Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of
sudoin Windows. - No porn, no politics, no trolling or ragebaiting.
- Don't come looking for advice, this is not the right community.
4. No recent reposts
- Everybody uses Arch btw, can't quit Vim, <loves / tolerates / hates> systemd, and wants to interject for a moment. You can stop now.
5. π¬π§ Language/ΡΠ·ΡΠΊ/Sprache
- This is primarily an English-speaking community. π¬π§π¦πΊπΊπΈ
- Comments written in other languages are allowed.
- The substance of a post should be comprehensible for people who only speak English.
- Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures
We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations. - Keep discussions polite and free of disparagement.
- We are never in possession of all of the facts. Defamatory comments will not be tolerated.
- Discussions that get too heated will be locked and offending comments removed. Β
Please report posts and comments that break these rules!
Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I see at least a couple of problems here. The main one is that it assumes that the computer only has one user. This is often true, but not always.
Yes, I know it's a joke, but if you really must, read on...
If this script is run by a child on a shared computer, and that child chooses not to lie, the child and all adults with access to the machine lose access to /sbin/doas. Likewise if one adult chooses to lie that they're a child, they'll lock themselves and everyone else out, child or not, which is an opportunity for malicious behaviourIt also means that something else would need to be done with regard to /etc/enviroment. Even on a one user, two roles machine, that entry really ought to be under /etc/environment.d, but the more robust, multi-age, multi-user solution would need something entirely different to be implemented. /etc/profile would be the wrong place, and editing each user's .profile (or equivalent) and then making it read-only seems like a bad plan too.
if we are being kinda serious, we would probably just go with either the systemd user metadata solution, or... (on a scale of insane to less insane):
store it in a passwd comment (which means the finger command will now remotely leak age, but is backwards-compatible)
have an SELinux (or similar) setup so that new users have more restricted permissions by default. While I would absolutely do this myself whenever I have kids, this is just really unnecessary for most everyday users. At the very least this obfuscates the reason why a user might have less permissions.
make a generic, encrypted-by-owner file in /etc/, but this still has privacy issues if we need every account to state their age.
Obviously the best solution is just educating parents about managing parental controls, but we can't have nice things ig.