In a remote system to which I don't have console access, which I'm connecting through ssh, I broke the sudo installation and now I'm not able to use it at all, and I'm not able to restart as a root. The command I ran was:
sudo mv /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6_org
Everytime I do sudo <command or option> it says segmentation fault, for example:
~$ sudo -s
Segmentation fault (core dumped)
As specific cases,
idworks:uid=1479554(s1474782) gid=100(users) groups=100(users),27(sudo),999(docker)shworks as wellsudo iddoesn't work:sudo id Segmentation fault (core dumped)su s1474782 -c iddoesn't work:sudo id Segmentation fault (core dumped)
I was updating some libraries and I think I broke the libm.so.6 library, however I don't see sudo depending on it:
ldd $(which sudo)
linux-vdso.so.1 => (0x00007ffd7ef9e000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007f139de21000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f139dbff000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f139d9fc000)
libsudo_util.so.0 => /usr/lib/sudo/libsudo_util.so.0 (0x00007f139d7e8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f139d41e000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f139d1ae000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f139cfaa000)
/lib64/ld-linux-x86-64.so.2 (0x00007f139e26b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f139cd8d000)
Any advice how to solve this? I can just re-install sudo?
su s1474782 -c idwork? You'll need to use your password to test this, and I'm asusming your username iss1474782. (I'm looking to see if the problem lies in the PAM authentication subsystem or insudoitself.su s1474782 -c idgives the sameSegmentation fault (core dumped)error, I'll update the question