Unable to switch to root user in Linux?
Solved
Installed a debian zorin os instance. Upon attempting to change user to root I wasn’t being placed in a shell.
As result I had to end my session and reopen a putty terminal. Very annoying if you are trying to lab and cannot access root user.
Checking the shell I am using for my current user I see that I am using bash
Running a `$getent passwd` command will grab all the information from the /etc/passwd directory which is the file that holds all the information about the system users names, UID,GID, and default shell.
After running this command we see that the default shell for the root user is dash. Dash stands for Debian Almquist shell. Dash is about 4 times faster than bash when it comes to execution. But in this instance Dash is not bash compatible. We need to change that.
To change the default shell of a user we run the `$sudo chsh -s /bin/dash root`Â Â command.
Now we are able to become the root user.