3

On someone's ubuntu VPS I created a user, added them to sudo and logged in. Figuring I didn't need the root password anymore, I got rid of it. Then for whatever reason I felt I needed to go back to root. I type in sudo -s and put in the users password. Then before my command it said something like

bash@name#

Then I could su root.

Just wondering what bash is, how I could switch to it before and I can't on my current vps.

Thanks :D

1
  • What is your actual question here? Are you sure it said bash@name not root@name? Have you read the manual page for sudo man sudo in particular the sections for sudo -s and sudo -i? – steeldriver Dec 21 '15 at 13:37
0

Bash is Unix shell.

But without giving more information we can only guess what is there behind this behaviour. Relevant would be the line from /etc/passwd about this user (if it is real user) and content of /etc/sudoers.

My theory is that this bash user has UID=0 as root and when you run sudo it is run under this user context (instead of root). But this QA site is not about playing such a games.

1
  • link Just to show you what happens on my MacBook. The same thing when I typed in sudo -s happened on the VPS I was referring to. – user379658 Mar 24 '16 at 15:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy