Error while logging as root in ubuntu [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
When I try to change user to root, I get below error
➜ ~ su
Password:
Cannot execute /usr/local/bin/fish: No such file or directory
Any idea how do I get rid of this? I do not have fish installed now. I had installed it earlier.

I did the following and it worked for me.
Did "sudo bash" and got logged in as root. Was not able to login as root using normal "su" as it was throwing the error related to fish.
Deleted all traces of fish and zsh
logged out and logged in with my normal user name. Now , the default shell bash is working fine.

Related

change root#<name> in Ubuntu 18.04 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
On my machine i'm getting "root#umar" that I want to change to "root#junaid". I have tried running different commands. They do change my username but above mentioned name is not changing.
See in above image. User I'm logged in as is "Junaid". But before that there is "root#umar" that I want to be changed to "root#junaid". Solutions I have tried change my current username that I'm loggedIn as.
Any solution?
"umar" is the hostname. So you should change it to get prompt like "root#junaid"
To do this on the fly you should exec next command:
sudo hostname junaid
sudo vi /etc/hostname
(to update the hostname there)
and the same in hosts file
sudo vi /etc/hosts
If you run commands as root you do not need to have sudo

Linux "-sh: 25: [[: not found" not being logged into user when using SSH [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
When I SSH into the server, I'm not being fully logged in. What I mean by this, is that if I use whoami, it displays my account. However, my .bashrc never gets initiated. My terminal also looks like:
-sh: 25: [[: not found
$
Once I su into the account, everything works fine, and my terminal shows:
user#ip-000-00-00-000:~$
What's causing this?
This happens because your login shell is sh, a simpler shell with fewer features. You can change it to bash with chsh.

How to execute sudo as user with root password [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
How can I configure Linux to see the prompt for the root password if Sam try to execute the following command: $ sudo mkdir /opt/test?
If Sam is part of sudoers, the terminal ask for the user password not for the root password.
In /etc/sudoers, add this line:
Defaults rootpw
Make sure you use visudo for editing this file. For more information, you can check the link

Not login to system due to changing permission [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am using Linux system but by mistake I fired a chmod command as follows:-
chmod -R 777 /
after that I restart my System. But when I try to login, the system is login but after 2-3 seconds again to login window. Please help me to solve this problem.
Just get your important files and configs backup them. format the partition which the OS installed, then reinstall again, sorry there is no easy way to correct these permissions.

Not getting proper prompt when using SHH [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I logged into my account on Bluehost using SSH and I got an unusual prompt.
I expected it to show the directory and a typical prompt but instead got some bash.
What you're seeing is the default bash prompt. This is what you get when the distro doesn't provide a better one in /etc/profile or similar. You can get it on any platform by ignoring the environment and config files:
env -i bash --norc
To get the user#host:dir$ prompt that Debian and derived distros use, you can add
export PS1='\u#\h:\w\$ '
to your .bash_profile

Resources