Questions tagged [chsh]

16 questions
77
votes
11 answers

chsh always asking a password , and get `PAM: Authentication failure`

Today I tried to switch to another shell. First I tried fish, and used chsh -s fish to change fish to default. After some time I found it cannot use ~/.bashrc (&& needs to be replaced by and). Because I prefer to reusing ~/.bashrc, I found zsh…
Mithril
  • 2,541
  • 3
  • 24
  • 30
56
votes
10 answers

user does not exist in /etc/passwd when trying to change the default shell

I want to change my default shell from tcsh to bash. So I tried and this is what happened: >sudo chsh userid Changing the login shell for userid Enter the new value, or press ENTER for the default Login Shell [/xhbin/tcsh]: /bin/bash chsh:…
rmp251
  • 1,181
13
votes
3 answers

Change default shell when user not in /etc/passwd

Any ideas on how can I change the shell to fish? $ sudo usermod -s /usr/bin/fish jaan usermod: user 'jaan' does not exist in /etc/passwd $ getent passwd $USER jaan:x:15466:94:Jaan A:/home/jaan:/bin/zsh Related questions: user does not exist in…
7
votes
4 answers

chsh: "You may not change the shell for 'username'."

I'm trying to change the default shell for my user. But I keep getting this error: $ chsh You may not change the shell for 'flimm'. $ chsh -s "$(which bash)" You may not change the shell for 'flimm'. I'm trying to understand why I may not change…
Flimm
  • 44,031
6
votes
1 answer

How to change root's shell back to bash?

I tried to change root's shell with chsh command, but now I get an error when I try to connect as root with sudo -i. $ sudo -i sudo: /usr/bin/bash: command not found What do I have to modify to get the bash shell?
5
votes
4 answers

14.04 Not authenticating on chsh command

I am trying to change my default shell to zsh. I have the entry placed correctly in /etc/shells file. Each attempt I have made with this command has ended with the same error message: chsh -s $(which zsh) Password: ### after entering the correct…
RCF
  • 2,127
4
votes
1 answer

I am trying to change my shell with chsh but I am getting an error

I can't change my bash shell to fish with chsh, because it asks for a password, which isn't my root password, and after I type something in I get this: chsh: PAM: Authentication failure This is my /etc/pam.d/chsh configuration file: # # The PAM…
gfejer
  • 63
4
votes
1 answer

What is the correct way to allow accounts without passwords to chsh?

I hope I have phrased this question correctly, it's a bit of an odd one. I have an Ubuntu 18.04 host with many users on it. All of the users log into their account on the host via SSH public key. All accounts have no password. This means that the…
eil
  • 163
3
votes
1 answer

What happens when you chsh without a user name?

One may: sudo chsh -s /bin/sh or sudo chsh -s /bin/sh user_name It is understood that the second command changes the shell for the specified user_name but unclear what happens without specifying a user_name and where is that reflected? Thank you!
AturSams
  • 225
2
votes
0 answers

PAM authentication using ssh key instead of password

When I try to use chsh to change my default shell, I get prompted for my user password. The problem is I log in using my SSH key and do not have a user password - by design. Yes, I can set a password for my user account. I am interested to know if…
hanxue
  • 700
1
vote
1 answer

How can I use my own shell as the login shell?

Suppose that I have a mini-shell, named minish which provides only cd, ls, rm, mkdir, etc. minish is saved in ~/Desktop/Shell. It can be used from other shell, such as bash, by calling just ~/Desktop/Shell/minish. It works well. But to use it as the…
Analysis
  • 113
  • 2
1
vote
2 answers

Root invalid default shell

We have a server with ssh enabled, and we have: PermitRootLogin: no, and a user that is not in sudoers file. Another administator set invalid Shell for root so I can't get root access anymore. When I run su command and enter root password it says:…
Ivan
  • 25
1
vote
1 answer

How does `chsh -s $(which zsh)` work?

I changed my shell recently to ZSH, I heard people say they liked it a lot more than the default BA shell or BASH. Everything went fine, followed a guide word for word, and the guide did not miss lead me, however; as is the problem with such guides,…
0
votes
1 answer

Unable to login to root after running ansible scripts

I am currently not able to login to my super user. Here is the sequence of events ~ su password: su: using restricted shell which zsh su: failed to execute which zsh: No such file or directory Previously I was trying to automate with…
0
votes
0 answers

chsh: /etc/passwd.20598: Permission denied

I've given an Ubuntu 18.04 box with user account which have root permission but not use /bin/bash as default shell. Hence, when I ssh to it, when I hit left, right, up, down ←↑→ keys, it will produces ^[[D ^[[A ^[[C I want to change the user to…
Luke
  • 605
1
2