libera/#devuan/ Saturday, 2022-10-15

judabudaHow do i make my own devuan fork and customize the installation?20:07
golinuxjudabuda: https://dev1galaxy.org/viewforum.php?id=920:08
judabudagolinux: Thanks, but i need to know how i can get started with making my own derivative20:11
tux12judabuda: may be this can help (didn't try it out) https://www.devuan.org/os/distro-kit20:21
AfdalSomeone explain to a dummy how to use sudo swapoff -a; sudo swapon -a without going to a terminal20:40
AfdalI've thought about pkexec but I don't think it works for this sort of thing20:40
Afdalerr, wait...20:41
fsmithredafdal, set up sudo nopasswd for that command and for that user20:41
AfdalEh?20:41
fsmithredthen make a panel button or whatever to run that command20:41
Afdalwhat's nopasswd20:42
AfdalAnd do I actually want to remove the sudo requirement...20:42
fsmithredwhat sudo requirement?20:42
Afdalfor swap toggling20:42
fsmithredyou must be admin to do that20:42
Afdalseems risky20:42
fsmithredwell, if others have access to your computer, then they could turn swap off without needing to know your password20:43
AfdalI'd prefer if the password requirement remained20:43
Afdala simple pkexec prompt from a shortcut would be nice20:44
fsmithredthen don't user nopasswd in your sudoers.d file20:44
fsmithredis there such a thing? the simple part, I mean.20:44
Afdalwait, do I just put this in a .sh script and run the script?20:44
Afdalpkexec urscript.sh?20:45
fsmithredpkexec needs a file in /etc/something20:45
AfdalBy the way has that huge security hole in pkexec finally been fixed20:45
fsmithredetc/pam.d/ ?20:45
Afdalthere was a big exploit like nine months ago if I remember20:45
fsmithredno clue20:45
fsmithredI try not to pay attention to any policykit stuff.20:45
AfdalLocal Privilege Escalation in polkit's pkexec (CVE-2021-4034)20:46
Afdal^ that thing20:46
fsmithredfor example, synaptic has a script in /usr/bin/synaptic-pkexec. It comes with the package.20:48
fsmithredmy browser shows that I've already been to this page: https://security-tracker.debian.org/tracker/CVE-2021-403420:49
fsmithredit's fixed20:50
Afdalhmmm good20:51
fsmithredAfdal, are you on chimaera or beowulf?20:51
Afdalchimaera20:51
AfdalAnd I might switch to Ceres sometime in the near future20:52
Afdalor was it daedalus20:52
fsmithreddaedalus next release20:52
fsmithredceres is sid is always unstabl20:52
fsmithrede20:52
fsmithredI can't tell if the devuan versions of policykit-1 are fixed or not20:53
fsmithredby looking at the version20:53
Afdalyeah Daedalus is what I meant20:54
AfdalI'm not crazy...20:54
Afdalpkexec bash cleardatswap.sh20:56
Afdal /bin/bash: cleardatswap.sh: No such file or directory20:56
Afdalhmm, what am I doing wrong here...20:56
Afdalcleardatswap.sh: line 2: swapoff: command not found20:57
Afdalcleardatswap.sh: line 2: swapon: command not found20:57
AfdalUh, are swap commands not recognized in bash scripts?20:57
Afdaloh it's one of those things that's hidden from bash environment without sudo preceding it20:57
sixwheeledbeastroot?20:58
Afdaland for some reason pkexec doesn't work...20:58
tux12use full path to files20:59
Afdalsudo bash cleardatswap.sh works fine20:59
Afdalpkexec bash cleardatswap.sh does not...20:59
fsmithrednot sure what you expect pkexec to do20:59
Afdalto give me a GUI password prompt21:00
Afdalthat's the purpose of pkexec21:00
Afdalso I can run this command outside of terminals21:00
fsmithreddoesn't it need a file to tell it how to interact with the command you want to use?21:01
AfdalDoes it?21:01
AfdalI use it in this way for other things...21:01
fsmithredlike what?21:03
Afdalpkexec mousepad %f21:03
AfdalI use this to open files in mousepad with root privileges ;y21:03
fsmithredyeah, I just tried it with geany and it came up, but the I got an error message that it can't open the display21:04
Afdalo rly21:05
fsmithred /usr/share/polkit-1/actions/21:05
fsmithredI see a file for mousepad21:05
fsmithredbut not for geany21:05
sixwheeledbeastfwiw it's not correct to use .sh extension for bash.21:07
AfdalOh?21:10
Afdalwhat's the correct thing to do?21:10
fsmithredno extension, I think21:10
fsmithredsh suggests /bin/sh21:11
AfdalI always just do bash script.sh when I wanna run a script21:11
fsmithredAfdal, did you look at /usr/share/polkit-1/actions/org.xfce.mousepad.policy ?21:12
sixwheeledbeastextensions aren't required.21:12
sixwheeledbeastsome people use .bash21:12
AfdalThat doesn't work when I want to set something to a shortcut, sixwheeledbeast21:12
fsmithredwhy not?21:12
Afdallike for example an Xfce keyboard shortcut21:12
Afdalbecause it wants to call up programs21:12
sixwheeledbeastshebang declares what program the file runs with.21:13
sixwheeledbeasthow does that matter21:13
fsmithredyeah, linux doesn't really care so much about the name21:13
* Afdal shrugs21:13
fsmithredit looks at what the file really is21:13
AfdalAh, now I understand what pkexec actually does fsmithred :)21:14
fsmithredif using just the program name doesn't work, try the full path to the program21:14
fsmithredthen you have me beat.21:14
AfdalI thought it was just a thing that runs stuff with a password prompt, but I guess it depends on whatever you define it to do21:14
fsmithredI read that stuff and go crosseyed21:15
Afdalwith those policy files21:15
Afdallol21:15
fsmithredthe thing it replaced worked like you describe21:15
fsmithredI can't even remember what it was called.   g...21:15
AfdalAlthough it seems most of these policy files do in fact say <description>Run Thing as root</description>21:15
fsmithredyeah, that's what you want, right?21:16
Afdalyeah21:16
AfdalSo maybe I need to make one of these for... bash?21:16
fsmithredfor your specific script21:16
AfdalThis seems like I could be setting myself up for a vulnerability21:16
Afdaloh for the script itself?21:16
Afdaluh how would that work21:17
Afdalpkexec .script.sh?21:17
fsmithredor maybe for swapon/swapoff21:17
fsmithrednot sure21:17
AfdalI'm just tired of cluttering up my terminal history with sudo swapoff -a; sudo swapon -a to be honest21:17
fsmithredput those commands in a script and tie them to a button or keyboard shorcut21:18
fsmithredoh, if you want password, then you need something to take the password. I've done it with xterm in the past.21:19
AfdalHence, the pkexec thing21:20
fsmithredany time I've tried editing one of those pkexec files to get it working correctly, it did not do what I expected it to do.21:21
fsmithredand did not work21:21
fsmithredbut it's been a few years since I've tried any of that.21:21
fsmithredxterm -e "echo 'Enter password' && sudo swapon -a"21:25
fsmithredor you could create a file that looks kinda like the pkexec file for mousepad.21:26
fsmithredIf your user is set up to use sudo for all commands, then you don't need to do anything else.21:27
fsmithredif not set up for sudo, change "sudo" to "su -c"21:28
fsmithredgksu is what I was trying to remember21:36
AfdalI would never set my user to use sudo for all commands21:38
Afdalthat's crazy...21:39
Afdalat least for a network-enabled machine...21:39
fsmithredthat's every ubuntu installation21:39
Afdallol since when?21:39
fsmithredsince forever. Primary user is in the sudo group.21:40
fsmithredthere is no root password.21:40
AfdalIs Xubuntu setup differently?21:40
Afdalor Lubuntu21:40
AfdalI've rarely touched vanilla Ubuntu21:40
fsmithredI don't think so.21:40
AfdalI don't remember it being like that21:40
AfdalXu and Lu, that is21:40
fsmithredyou can create a root password, but don't talk about it on their forum21:40
AfdalI can never remember my root passwords21:41
Afdalwhen I set them21:41
fsmithredisn't that what post-it notes are for?21:42
onefangOr password managers?21:47
XenguyCurse Ubuntu for ever breaking the root password model21:52
AfdalWhat do you mean Xenguy22:08
AfdalI think sudo with non-root users is generally better than going to root22:08
AfdalIs Canonical the one who started that trend?22:09
Xenguy1. I disagree22:10
Xenguy2. AFAIK, yes22:10
AfdalWhy do you disagree :c22:11
live1:c22:12
Afdal:'c22:12
XenguyQuite simply, I think the original *nix security model was designed by people smarter than those who decided to change it22:14
XenguyDon't fuck with that shit for the sake of 'convenience'22:15
Afdalroot has too much power, it's easy to accidentally do something really bad with it22:16
AfdalIn fact I've done so before22:16
XenguyThat's the power of *nix, and with great power comes great responsibility22:16
AfdalI prefer the thought that goes into the sudo paradigm22:16
Afdalthe thought on the user's part22:16
XenguyLook at Canonical now:  ads in terminals (is the latest I'm reading) ?22:16
onefangThink youk are wandering into #devuan-offtopic now.22:16
XenguyJust, no22:16
Xenguyonefang, yes, thanks for the reminder22:17
Afdaloh yeah gksudo was the older thing you were thinkin of fsmithred22:22
AfdalI wonder why it was replaced by pkexec22:23
AfdalAnd I wonder if we should be suspicious22:24
Afdalconsidering policykit is IBMware22:24

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!