this post was submitted on 20 Mar 2026
355 points (91.8% liked)
linuxmemes
30689 readers
448 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 will not be tolerated.
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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I have been really trying to avoid implementing it into the user session, it requires superuser to run the commands and I don't like the concept of hardcoding sudo paths using nopasswd
But I probably will end up having to do something similar in the user environment.
edit: Now that I think about it, I could probably just make the command path to the network command be authorized as no password on any user as I don't really see a situation where the user logged in shouldn't be able to manipulate the network it's connected to.
Afaik you can make a particular script available without a password, via sudoers. I forget how exactly, but I've looked into this in the past.
Alternatively, you can set the owner of the script to root and set the setuid permission on it, so it runs as root regardless of who launches it.
In both cases, if you hardcode the necessary operations in the script, it shouldn't be possible to do anything else with it other than connect to WiFi.
Of course, you can also try setting it as a service to run as late as possible, perhaps that would fix it. Idk how services are specified in Arch, but usually with oldstyle init systems it's the numbers at the beginning of the filename, and if you name symlinks to the script something like β99-start-wifiβ, it should run among the last services at the particular init level.
I had forgotten about the set UID flag. That might actually fix the issue altogether without having to do a hard-coded sudo path.
And would mean I wouldn't have to double check the commans to make sure that there's no destructive subcommands that could be done as well.
I might try that later, thanks!