1
I’m on a Google Compute Engine which is running Debian Wheezy 7.4.
I’ve been noticing strange things recently. For example, I can do sudo bash
. But then, from root, I can’t do sudo -u anotherUser bash
or su -l anotheruser -c bash
.
And, even more importantly, I can’t start new instances of GNU screen. If I try starting a new instance, it immediately shuts down and I get the [screen is terminating]
message. In the instances that were running, I could not start more windows.
Then I found what all had in common: bash
!
I can do screen zsh
or screen sh
.
I can do sudo bash
and then sudo -u anotheruser zsh
or su -l anotheruser -s zsh
but NOT su -l anotheruser -c zsh
.
Note that I am logging in with bash and I can do sudo bash
. But I can't use bash for sudo
or su
from root to another user, nor can I use bash for a screen
shell.
I rebooted. Yes, this worried me so much I actually rebooted my server.
I have no idea what can cause this and I'm a bit worried.
My bash config files (as for as I know they are unchanged from default):
/etc/bash.bashrc
: http://pastebin.com/CsjeJBYd~/.bashrc
: http://pastebin.com/YfkAZUv9
bash completion works on the main (login) shell.
Here is the information requested by Glenn Jackman:
$ md5sum /bin/bash /usr/bin/bash
144968564a6b1159ed82059920cea76f /bin/bash
md5sum: /usr/bin/bash: No such file or directory
$ getent passwd anotheruser
anotheruser:x:1004:1004::/home/anotheruser:/bin/bash
Also I thought of another test. This works:
$ echo $(bash -c 'echo Hello, World!')
What's going on?
What do these return:
md5sum /usr/bin/bash /bin/bash
andgetent passwd anotheruser
?? – glenn jackman – 2015-02-19T05:05:11.643I'll add those to the main body of the question. I still think some profile files are to blame. It's the only thing that makes sense to me. – eje211 – 2015-02-19T18:00:58.547