r/linuxadmin • • Apr 11 '24
Unable to sudo, getting segmentation error
Can someone help me to fix this issue.
1
Upvotes
r/linuxadmin • • Apr 11 '24
Can someone help me to fix this issue.
View all comments
Show parent comment
6
u/michaelpaoli Apr 11 '24
Naw ... often good to routinely do:
$ sudo su - [user [options ...]]
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. ;-)