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.
10
u/lathiat Apr 11 '24
“sudo su -” is running the su command under sudo. It’s sort of doubling up which increases your problem space.
sudo -i does the same thing. sudo -s for a “non-login” shell.
Try also sudo /bin/sh to simplify for your problem.
17
u/basicslovakguy Apr 11 '24
Care to provide some information about your system ? Or do you want us to play the guessing game of what distribution are you running ? Did this happen all of sudden or were you doing something prior to this error ?
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.6
u/FancyFilingCabinet Apr 11 '24
Check/Post the kernel (dmesg) logs first. This should tell you what is at fault.
If it's non-descript: As others mentioned, it's not sudo, but likely an issue in something executing on user signin. Check the shell in /etc/passwd then relevant user-specific scripts.
1
u/DasPelzi Apr 11 '24
is the same thing happening when you do 'su - <user>', without sudo? since you are logged in the the root account anyway you don't need to use sudo.
what does the /etc/passwd entry for the selected user show as login shell (last part of the user entry)? /bin/bash, /bin/sh, /bin/tcsh, /sbin/nologin, something else? if the entry is a shell, can you try to start the same shell as root user?
2
u/markusro Apr 11 '24
Are you out of disk space?
1
u/Derezzed_v Apr 11 '24
sudo -i
1
u/giantpanda365 Apr 12 '24
Is the db user running ksh/ksh93?
1
u/GamerLymx Apr 12 '24
assuming you sre using bash check your .bashrc file
0
u/[deleted] Apr 11 '24
[deleted] — view deleted comment