libera/#devuan/ Wednesday, 2021-08-25

xubuntuDoes anyone know where the "modprobe" command went?00:54
xubuntuI'm a root user on a Devuan install but there is no modprobe command00:54
UsLworks for me™00:56
UsLwhich install?00:57
xubuntunet install iso00:57
xubuntuwith XFCE installed00:57
xubuntualso I have no "ifconfig" even though net-tools is installed00:57
xubuntubeowulf00:58
UsLhuh..00:58
xubuntui've seen this behavior when I'm not a root user where it seems to hide those commands00:58
xubuntubut I'm root00:59
UsLsure, but not from root as you say.00:59
xubuntui think I just got it01:00
fluffywolfdid you become root in some fashion that did not set the path?01:00
xubuntuApparently /sbin is not in the root $PATH variable01:01
debdogroot via "su", perhaps, xubuntu?01:01
debdogright01:01
xubuntuYea I was root via su01:01
UsLsu - root01:01
xubuntusu - root does it01:02
xubuntuthanks!01:02
UsLgood.01:02
xubuntuI'm coming from FreeBSD where just su works01:02
xubuntualthough I remember just su working on Linux a while back.01:02
UsLI don't remember when that changed tbth01:03
debdogI think there is an option to return to the old behaviour I just cannot remember how. but it ist should be on the forums somewhere01:03
xubuntustrange. Anyways thanks for the help guys01:04
rwpIt was a change from linuxutils su to coreutils su (or was it the reverse) and it changed PATH setting.01:04
xubuntuahh i see01:04
debdogthere it is: https://files.devuan.org/devuan_beowulf/Release_notes.txt01:04
UsLah, right01:04
rwpI have always used "su -" or "su - rwp" and so forth to load the target environment.  Otherwise HOME doesn't change and damn aptitude will leave root owned files there!01:05
UsLah, that is why I have su - root/user as my aliases.01:06
UsLnow I remember01:06
rwpIt used to be the "login" package /bin/su and it is the "util-linux" package /bin/su now.01:07
UsLI remember I thought it was logical to have smthng after su since it means susbtitute user. For what? ah, - root/user. Made more sense in my mind01:09
rwpThe choice of the "-" is because login shells always start with a "-" such as "-bash" and that tells the shell it is a login shell and should source the .profile file.01:10
UsLah, right01:10
rwpAnd it doesn't matter about the rest of the name either.  So "-su" could be a bash shell and since it starts with a "-" it tells bash to load the login profile.01:12
rwpOf course these days the "-" confuses people and so they added "-l" as a more normal looking option to do the same thing.01:13
rwpBeing a traditionalist I use the traditional way myself with "su -" no "-l" for me.01:13
xubuntuinterestingly, If I do "sudo su" without the "-", its loads /sbin in the $PATH01:15
rwpIntroducing "sudo" to things introduces the rules "sudo" uses to do things.01:16
rwpI am perfectly fine with "sudo su -" but just to note that "sudo -i" is the same as "su -" as far as the result and it only uses one set of rules and stacks one fewer processes.01:16
UsLI disabled sudo since I didn't understand it quite and thought it was a security risk.01:16
fluffywolfI've used "su -" since well before sudo existed.01:17
rwpUsL, Humorously other people do the exact opposite for the exact same reason! :-)  (I enable both.)01:17
UsLhehe : )01:17
rwpI enable both, which is to say that neither are more risky than the other.01:17
fluffywolfI think sudo is much riskier in a multi-user system where multiple people use it.01:18
UsLwasn't there like a ten year old bug in sudo fixed fairly recently now that I came to think about it01:18
* UsL goes look01:18
rwpBoth sudo and each of the su flavors have had a few bugs posted against them over the last decade.01:19
fluffywolfsudo makes you think you can let people do some things but not other things, while in reality, letting people run anything more than "ping" as root is the same as giving them the root password.01:19
fluffywolfit gives admins a false impression that they can grant limited admin access01:19
rwpAh...  fluffywolf has hit the problem precisely.  "sudo -i" is the same as "su -" so no problems swapping the use of those around.01:19
fluffywolfwhile giving them the password to su makes the admin actually evaluate whether they really want someone to have full control of the system.01:19
rwpBut if one tries to limit commands and restrict them to a specific thing, and screw it up, then they allow users to escape to root with a privilege escalation.01:20
fluffywolffor example, any program that is capable of writing a text file, if ran as root, can give the user root access.01:20
rwpYes.  But see the "sudoedit" command and features for editing a root owned file as non-root.01:21
rwpsudo can be used safely in that way but su has nothing equivalent.01:21
fluffywolfeven if it's some feature you didn't expect, like a command line option to change where the program save some log file.  someone can easily abuse that to overwrite something with a crafted log entry and have root access.01:22
rwpYes.  But that is one way of "screwing it up".  So if one is trying to limit access then one must also limit access completely, by blocking arguments.01:22
fluffywolfI don't believe it's possible to restrict sudo safely on linux.  the security it pretends to offer needs to be implemented somewhere else.01:23
fluffywolfso it gives admins a false sense of security.01:23
fluffywolfand thus is more dangerous than su.  :)01:23
rwpI disagree that there is no way to use sudo to give limited access safely.  One just needs to read the docs and follow the rules for it.01:24
fluffywolfI'm sure you can come up with specific programs with specifically crafted sudo configs that aren't a risk.  ping, like I already said.  but in general, I'd say the vast majority of programs can be used to gain root access, often in ways most admins would never suspect.01:25
rwpFor example I allow non-root on some systems to stop, start, restart, the Apache web server.  Doing that does not allow them root access.01:25
rwpAnd apache so often gets wedged where it needs it.  (Never seen Nginx wedged that way.)01:26
fluffywolfI've never had to restart apache.  lol01:26
unixman_homeI can't recall a time I had to restart Apache for anything but an update to Apache.01:27
fluffywolfif they can run the apache binary directly, not just the /etc/init.d script, I'm sure they could get root from it.01:27
rwpBut mostly I use sudo in the simple way of "sudo -i" and it is certainly not less secure than "su -" in that case.01:27
fluffywolfsince it takes every config option on the command line, including dangerous ones.01:27
rwpI do not allow random options on the command line.  Just "service apache2 restart" and the others.  No others are allowed.01:28
fluffywolf...  service?  eww.01:28
UsLisn't a service?01:29
rwpOh look at the time!  I need to run.  I'll be back on again for rebuttals later.  TTFN!  (Why eww?  service is the clean environment way to run init scripts.  Are you using systemd?  Here in #devuan??)01:29
unixman_homeI have a cow-orker who swears 'doas' is more secure than 'sudo'. :D01:29
fluffywolfoh, wait, there's a non-evil service command too.01:29
fluffywolfmy bad.01:29
fluffywolfI forgot someone made one that uses sysv scripts.  heh.01:29
UsLyou had me stumped there for a second fluffywolf01:29
UsLrwp see you later01:30
fluffywolfI forgot it wasn't always pointed at systemctl.  :)01:30
UsLa what now?01:30
UsL: )01:30
UsLI need to go for a while as well. Se you all later01:31
fluffywolfof course, some form of watchdog cronjob might be an even better option.  :P01:32
fluffywolfcyas01:32
XenguyStrangely I always used 'su -' to become root, cos I thought if I didn't I wouldn't get the full root environment.  It turns out that's the way it actually works now, so I just lucked out : -)02:11
fluffywolfit's always been that way?02:12
fsmithredyeah, that part has always been that way.02:12
XenguyWell I thought it was, but apparently people are saying I was wrong about that, for a time02:12
fsmithredthe change is if you just use su02:12
fsmithredyou don't get root's path02:12
XenguyBut I thought it was always that way, but more recently people say that's not true02:13
XenguySo, dunno02:13
fsmithredthe old way, 'su' got you root's path but didn't change you to root's home.02:13
XenguyOhhhh02:13
fsmithredwhich is what I usually want02:13
XenguyI see, interesting02:14
fluffywolfI could have sworn su with no - didn't get you root's path, or anything else - it just changed your uid.02:14
XenguyWell anyway, I have the muscle memory now, cos I always did it that way02:14
fsmithredfluffywolf, I've seen it change at least a couple of times in the last 20 years.02:15
fluffywolfmaybe I missed it changing to where it worked, then.  lol02:18
fluffywolfsince I don't remember any time you ever didn't use -, since you always wanted a login shell.02:18
fsmithredascii02:21
fsmithredI guess it wasn't a login shell because you didn't cd02:21
* fluffywolf has been using su - for like 25 years. lol02:26
onefangAh I knew there was a reason I don't use the service command.  Just read the man page, the mere existence of a systemd unit means it takes precedence over init.d scripts, and there's still too much systemd cruft left laying around in Devuan.  If there was away to switch that off, would be good.09:36
onefangApache was mentioned above.  Yep, I got an apache2 systemd unit in one of the places the service command searches.09:37
oldmateHi, i just installed mate desktop on chimeara and when i try to poweroff it goes to the lightdm login screen and the power menu is all greyed out? I think i maybe missing something. In a terminal when i type "loginctl poweroff" a password prompt appears?14:13
oldmateThe power menu in lightdm is greyed out, not in mate desktop.14:13
oldmateThe iso is the latest netinstall from 23rd august14:14
oldmateI didnt use tasksel to install mate desktop, i did it from tty when i installed the base and system utils only.14:16
gnarfacecould be a missing package14:27
gnarfacepermissions backend dependency library or such perhaps14:28
fsmithredmaybe policykit-1-gnome14:30
oldmateid say so @gnarface im just at a loss what it could be. @fsmithred ill try that and report back later on. Thanks14:31
oldmatepolicykit-1-gnome - that was it, thanks @fsmithred14:43
fsmithredyw14:44
fsmithredoldmate, I don't know the situation with mate in chimaera, but in earlier releases some people were using xfce-power-manager. Keep an eye out for issues.14:45
oldmateokay will do.14:48
Guest56Hi! I have a problem with Thunar. For some reason it can't start without root.18:59
Guest56How can I check what causes the issue and how to fix it?19:00
Guest56After I tried to run it from the terminal, there was no response for a longer while, and after this "Failed to register: Timeout was reached"19:01
Guest56It started to fail like this after some package installation, and restart.19:02
Guest56It starts fine with root though.19:02
rwpGuest56 has quit but to me that sounds like it was run by root and Thunar as root chown'd files in $HOME to root.19:39
rwpI would "find ~ -user root -ls" to look for them and "sudo find ~ -user root -exec chown -v $USER: {} +" to fix them.19:41
Tenkawarwp: I was thinking that or possibly the user doesn't have the right /etc/group perms for the daemon19:49
Tenkawathat would usually only happen though if someone had manually created the user and it didnt get added to the gvfs and other groups19:50
rwpWhatever group permission the user has is okay as long as they use it consistently throughout the timeline.19:52
Tenkawapolicykit it is also something else that acts up on this from time to time for file managers19:53
rwpBut what user these days would have modified their group in /etc/group?  Most newbies take some time to skill up to learning about UPG and other group things.19:53
rwpPolicykit!  Well...  Possible.  But that usually affects devices.  I am thinking that Thunar could no longer talk to communication sockets.19:54
Tenkawarwp: a lot of users start clicking things19:54
rwpYes.  Sadly.  And the new interface makes changes immediately without Apply/Ok and there is no Undo action.  Sigh.19:55
Tenkawaack19:55
Tenkawadid not hear about that19:55
* Tenkawa lives almost completely in cli on the Linux side19:56
rwpI should note here that having sudo to root interactions and root owned files has been such a problem for me that I have a crontab entry to notify me if any happen appear.  So I can note them and fix them.20:06
Guest56Thanks for the help. I will try those commands(I checked in the chat archive). Also, since the installation, the sudo command didn't work, because "user is not in sudoers". Should it be like this, by default?21:55
fsmithredGuest56, yes, if you created a root password during install, then user is not in sudo group.21:57
Guest56I tried "find ~ -user root -ls". This returned nothing.21:58
rwpGuest56, If you haven't used sudo then the same result might have happened using "su" (without "su -") which keeps HOME set as before.21:58
Guest56Also, what is the use of "~" here?21:58
rwpGuest56, Good!  Then that is not the problem.  And the problem is something different.21:59
rwpThe ~ character is expanded by the command line shell (bash?) to be $HOME your home directory, likely something like /home/rwp for example for me.21:59
rwpYou can see what it expands to by using "echo" to echo print out the command.  Try this: echo find ~ -user root -ls22:00
Guest56fsmithred I think I created it back then.22:00
rwpThat will show the ~ expanded.  Using ~ is a very typical shortcut and you will see it used everywhere.  "ls -l ~/.profile" or whatever.22:00
Guest56rwp About su. I know. It is the only way for me to use thunar for now.22:01
rwpHistorical note: At one time the ~ character on keyboards was on the same key as the Home key.  And that is why it has been used for that ever since.22:01
rwpGuest56, I sympathize but I don't know what the problem might be.  Don't know.  But it's not right.22:02
Guest56Thanks! I understand now. What could cause the issue, then?22:02
rwpIf it were me I would create a new pristine user account as a test.  Then reboot (to ensure all processes have exited) and log in as that new pristine user.  Then see if it is happy or unhappy.22:02
rwpIf it works then the problem is definitely in the configuration files of the home directory.  If not then the problem is in the system somehow.22:03
fsmithredcreate a new user and see if that user can start thunar22:03
rwpIf it were me I would "su -" to jump to root with root's environment.  Then "adduser testuser" answer the questions interactively.  Then exit, exit, exit, reboot, log in as testuser.22:04
rwpOkay to use any name you want for "testuser" which is just an arbitrary name.22:04
rwpFor me I might use "rwp2" or something.22:05
Guest56I just checked the /etc/group22:05
n4dirif already root, you might just as well run "reboot" straight away.22:06
Guest56If there is no user name after the "daemon:x:1:", would that make a problem?22:06
rwpNo "daemon:x:1:" is okay.22:06
rwpIn /etc/passwd your account has two numbers.  "rwp:x:1000:1000:Bob Proulx:/home/rwp:/bin/bash" for example for me.22:07
Guest56Right. What deamon would it be exactly in this cause?22:07
rwpI am using uid 1000 and gid 1000.  And that is the beginning and end of it.  Then in /etc/group "rwp:x:1000:" defines a name for the gid.  This follows the UPG User Private Group strategy.22:08
Guest56Cause all those are deamons, I guess, and just some have on the end user name.22:08
rwpAs far as what the problem is very sorry but I don't know.22:08
rwpFor the /etc/group entries that have a user appended to the end those get added to the user process at login time as *additional* groups.22:09
n4dirwhat is the problem, in short words?22:10
rwpSuch as the "sudo" group we have been talking about.  And possibly other groups.  I always add myself to "adm" and "staff".  Group adm gives read-only access to /var/log/* without needing root.22:10
fsmithredn4dir, only root can start thunar22:11
rwpn4dir, Previously Guest56 described that trying to run thunar "After I tried to run it from the terminal, there was no response for a longer while, and after this "Failed to register: Timeout was reached"22:11
rwpBut if "su" is used then thunar starts and runs as root.22:11
fsmithredis this beowulf or chimaera?22:12
Guest56chimaera22:12
fsmithredactually, it should not work in either of them22:12
n4dirok, i figured that, but then all the /etc/groups and other staff made me wonder. This way that way your "testuser" is sure what i'd do next too22:12
fsmithredi.e. you should not be able to run thunar from a root terminal unless you changed something.22:12
fsmithredsomething= root's PATH or an entry in /etc/default/su22:13
n4dirlike no display-manager, or did that change too?22:13
n4dirsure the other way around is the usual problem, not the user not being able to22:13
fsmithredGuest56, you said this started after installing some packages and rebooting. What packages? Look in /var/log/apt/history.log22:14
Guest56chimaera Why so? I always used this, when I needed to change something that needed the root permissions. It was easier that way.22:14
fsmithredsince beowulf/buster, they changed some things regarding su, and root can't run X apps.22:14
Guest56I have no internet for now too, because that installation. I tried to bring back working n-m.22:15
n4dirnothing written in stone, but without a display-manager i can start the mate filemanager as root from terminal22:15
fsmithredit's possible I'm wrong about that last point.22:15
Guest56Wait...Strange. It started to work again on its own.22:15
Guest56I mean, I can open thunar with the user account.22:16
n4diryee-haw !22:16
Guest56But I couldn't before, and I have no idea why I can now.22:16
n4diryou did reboot? or did it come out of nothing?22:16
rwpComputers are like cats.  Subtle and quick to anger.22:16
fsmithreddo you have a web browser open with a lot of tabs sucking up all your RAM? That'll slow things down.22:17
Guest56It was like this after a restart. I reboot again, and it was still like this. Then after I turned on it again later, as I tried that command for search, it again started to work.22:17
fsmithreddid you run the command that had 'chown' in it?22:18
rwpGuest56, Hmm...  It's not explained but perhaps it will remain unexplained. Unless you see the problem again.22:18
Guest56Just a moment before, as I clicked a thunar icon by a habit.22:18
Guest56I will ask again, if it happens.22:19
Guest56fsmithred I doubt about if it could be a ram issue. It could start from root, and it couldn't start from default user since the very session start.22:20
rwpI would also look through /var/log/syslog and see if there are any clues or error messages recorded there.22:21
rwpHowever there will be a lot of entries there for *everything* and not everything will be related to thunar.22:21
rwpBut hopefully perhaps something about thunar might be recorded there.22:21
Guest56fsmithred I did not, since "find ~ -user root -ls" returned nothing.22:23
Guest56So I didn't used that with chown.22:23
rwpGuest56, I will offer jokingly that if you are comfortable on the command line that "ls" on the command line is enough!  No need to ever run thunar.  I don't.  :-)22:23
n4diri assume the web result from that arch bug report were discussed about the thunar problem? someone mentions ~/.cache/... others mention other stuff, which is just voodoo to me22:23
Guest56rwp Right, just that it seems faster to navigate with a gui. :)22:24
n4dirnot for everyone, Guest56 :-)22:25
rwpykinmkbykiok! :-)22:25
Guest56But I need to write in the entire folder names, that are often lengthy, in order to go there. Isn't it?22:26
n4dirGuest56: it usually autocompletes just fine. Depends on the details, of course.22:27
n4diron cli i don't really type a lot22:27
n4dirreally not trying to convince you. If you like file-managers, nothing wrong, as far it is me22:27
fsmithredI do both, sometimes on the same desktop.22:28
rwpGuest56, On the command line in bash one types in the first part of the name, then types TAB to have it auto-complete the rest.  If it does not due to multiple selections possible then type TAB again and it will list the possibilities.  Type in another character and hit TAB again to complete more.22:28
n4dirand in addition there is the alternative history completion, set in /etc/inputrc . Also a time saver22:29
rwpYou say "it seems faster to navigate with a gui" but for me it is the opposite.  Because I have to stop and move my hands over to the mouse, find the pointer on screen, then click on it.22:32
Guest56Ny batery run out.22:32
rwpGuest56, Happy to hear your problem has mostly been resolved.  Good luck! :-)22:32
Guest56I will check for the autocompletion, I guess. I didn't used such till now.22:33
Guest56Finding pointer on the screen is rather an instant thing to me. I guess it could be harder by default with a very high resolution.22:36
n4dirGuest56: also a good one: !$, which is like the ~ from above, but for the last argument of the last command run (say i case it it is a long path). And all this is just the beginning. I only know what i need, and that is very little. - as said, imho nothing wrong with a filemanager, if one likes it22:36
Guest56Right, :)  I used it because it was more intuitive, and I didn't find time to remember well use of the commands.22:40
Guest56Though, there is little of them just for navigation, I guess.22:40
Guest56I have other question.22:44
Guest56Why cannot I initialize some programs from root terminal? Like the "mousepad". I get the "Failed to initialize xfconf: The connection is closed" error.22:45
fsmithredGuest56, that's because of the changes in su. It's possible to revert to the old way.22:46
Guest56How so?22:47
fsmithredsee 'man su'.  Put 'ALWAYS_SET_PATH yes' in /etc/default/su22:47
fsmithredyou will have to create the file22:47
n4dirthen you can start X apps even if a display-manager is running?22:47
fsmithredthen when you become root with su you will have root's path, you will stay in the current directory, and you will be able to run X apps as root.22:48
fsmithredyeah, I have a display manager.22:48
TenkawaI'm just catching up..  what about xhost/xaccess? isn't he still going to have to deal with that?22:48
fsmithrednope22:48
n4dirwhat a confusing situation. Let's change it every other day, so it gets even more confusing22:48
Guest56n4dir Yes. Why not to?22:49
n4dirwhy would it bother anyone if i want to run an app as root? shesh. Developers22:49
fsmithredI know that su got moved to a different package, but I've never seen an explanation of why they changed the behavior.22:50
Tenkawafsmithred: how is it getting around setuid root?22:50
Guest56I needed to do that to change the restricted files faster.22:50
Tenkawaexport DISPLAY=:022:50
Tenkawaroot@omen:~# xterm22:50
TenkawaNo protocol specified22:50
fsmithredTenkawa, I'm not sure I understand the question.22:50
fsmithreddid you do anything to change the default behavior?22:51
Tenkawanope.. non-root that works fine22:51
fsmithredthe behavior of su, I mean22:51
Tenkawait "suppose" to be that way22:51
Tenkawaby design22:51
n4diri will just keep claiming a display-manager is the culprit.22:51
Tenkawaits a security feature22:51
fsmithredI find it an annoyance. I want root's path and I don't want to change directory to /root.22:52
Guest56Anyways,thanks for the help! I will read try the fix from answers later. :)22:53
fsmithredI don't much care about running graphical apps as root, but that comes along with the change.22:53
fsmithredgood luck22:53
n4dirpretty sure it was like that before.22:54
fsmithredup until buster/beowulf. Then su got moved from login to util-linux22:54
n4dirthats why way back we had what? kexec? gtkexec? whatever it was called22:54
fsmithredgksu22:54
n4dirright.22:54
fsmithredkdesu22:54
Tenkawathey are still around22:55
n4dirit was easy. Lets quickly remove that22:55
fsmithredgksu is not in repo22:55
Tenkawanot in devuan/debian no22:56
Tenkawaother distros22:56
Tenkawaahh22:57
Tenkawaintegrated into a policykit gksu module22:58

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