sudo isn't segfaulting. something on the login path user π₯π₯π₯ is segfaulting. If π₯π₯π₯ can be logged in to normally, try that. Also try removing the - from your su invocation. There's probably something in π₯π₯π₯'s login scripts or rc files that is broken.
Also, as you are already root, the sudo part of sudo su is not necessary.
No, itβs not necessary, but muscle memory trumps man pages.
Given the huge amount of changes that go into a single OS update (not even talking about upgrades), and the large variety of commands we use daily, if we paused once a year to review the consolidated change logs, weβd be using the 1994 flags.
Most notably that works dang well and consistently on any *nix with sudo ... always has, probably always will. Also avoid problems like gee, the behavior of su without - in the util-linux sources has changed and/or some Linux distro has changed (patched) that behavior.
So, anyway, do it that way, using it with su - and it just bloody works and keeps on working. Also gives a slightly better audit trail too, with a wee bit of additional logging.
But hey, if you want to learn a different way of doing the same thing on any and all variations of *nix, feel free to do so. ;-)
It's not, but I still use it sometimes when there are paths that only root has access to read.
Say for example there's a whole tree of files somewhere and they're all only readable by root. Tab-completion won't work with a regular user, so I'll sudo su - into root while finding my way.
64
u/forbiddenlake Apr 11 '24
sudo isn't segfaulting. something on the login path user π₯π₯π₯ is segfaulting. If π₯π₯π₯ can be logged in to normally, try that. Also try removing the
-from yoursuinvocation. There's probably something in π₯π₯π₯'s login scripts or rc files that is broken.Also, as you are already root, the
sudopart ofsudo suis not necessary.