Whenever I attempt to su to root by using
su while logged in as a regular user on my Debian machine it silently fails, dumping me back into my original user and shell. While searching for this problem I came across solutions that explained that this behaviour is supposed to happen if the user I attempting to login to has an invalid shell in
/etc/passwd, which doesn't seem to be the case, the first line on the file is:
The only way I can su to root is with:
su -s /bin/sh
Since it looks like the problem is with the
bash installation itself, I tried reinstalling
apt-get install --reinstall bash while logged in as root, but the error still persists. How can I make it possible to login to root using bash with just
I just noticed that if during the timespan between hitting enter after entering root password and being dumped back into my original user I try hitting ctrl+c,
su works and I am logged in as root in bash.
If I'm logged in as
root using a shell, and run
/bin/bash from there, it returns me a Segmentation fault error.
I tried running
/bin/bash -x. It seems to run forever printing
/opt/spark//bin:/opt/spark//bin:/opt/spark//bin. When forced to stop with ctrl+c, it runs
root user as if nothing happened.
strace /bin/bash seems to be showing that the command tries to open
/root/.bashrc over and over again until it segfaults.