Showing Bash instead of Root User Shell On CentOS / Redhat 8
This issue will occur when you deleted the bash history profile of root users that are hidden and try to switch to root bash but not able to login. In This case, the root profile not found.
This happens when you incidentally deleted the hidden files which are shown below.
.bash_history .bash_logout .bash_profile .bashrc
I logged in as user “Pankaj” in the Linux machine.
Now I will remove those hidden files using rm -rf and I deleted them now I will log in again with the user then switch to root.
As you can see there’s a bash shell instead of the root user.
Because files are not present here for the root user. To solve, this issue copies those files from another Linux server and paste here as hidden files.
Now again switch to the user Pankaj to make sure it’s working fine.
See you can see now root user instead of bash.
That’s it root profile history not found delete history root switch to root bash root login at bash