Failed to login after setting fish as default shell
I tried fish
for a while, and then i wanted to set it as my default shell. I edited /etc/passwd
and changed the shell of my user to /bin/fish
.
The problem is I couldn't login anymore. I tried through my DM (SDDM), it said the login failed at any password I threw at it, correct or wrong. Then I tried it through a tty, got the same results. Replacing fish
with the shell I had before in my passwd
file seemed to fix this.
Is there any way to set fish
as the default shell and still be able to login?
I am running Manjaro Linux.
linux shell fish
add a comment |
I tried fish
for a while, and then i wanted to set it as my default shell. I edited /etc/passwd
and changed the shell of my user to /bin/fish
.
The problem is I couldn't login anymore. I tried through my DM (SDDM), it said the login failed at any password I threw at it, correct or wrong. Then I tried it through a tty, got the same results. Replacing fish
with the shell I had before in my passwd
file seemed to fix this.
Is there any way to set fish
as the default shell and still be able to login?
I am running Manjaro Linux.
linux shell fish
1
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,chsh
) it would/should have warned you about the problem.
– Kurtis Rader
Jan 18 at 5:42
add a comment |
I tried fish
for a while, and then i wanted to set it as my default shell. I edited /etc/passwd
and changed the shell of my user to /bin/fish
.
The problem is I couldn't login anymore. I tried through my DM (SDDM), it said the login failed at any password I threw at it, correct or wrong. Then I tried it through a tty, got the same results. Replacing fish
with the shell I had before in my passwd
file seemed to fix this.
Is there any way to set fish
as the default shell and still be able to login?
I am running Manjaro Linux.
linux shell fish
I tried fish
for a while, and then i wanted to set it as my default shell. I edited /etc/passwd
and changed the shell of my user to /bin/fish
.
The problem is I couldn't login anymore. I tried through my DM (SDDM), it said the login failed at any password I threw at it, correct or wrong. Then I tried it through a tty, got the same results. Replacing fish
with the shell I had before in my passwd
file seemed to fix this.
Is there any way to set fish
as the default shell and still be able to login?
I am running Manjaro Linux.
linux shell fish
linux shell fish
edited Jan 17 at 21:45
Kamil Maciorowski
27.8k156184
27.8k156184
asked Jan 17 at 21:25
Andy3153Andy3153
82
82
1
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,chsh
) it would/should have warned you about the problem.
– Kurtis Rader
Jan 18 at 5:42
add a comment |
1
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,chsh
) it would/should have warned you about the problem.
– Kurtis Rader
Jan 18 at 5:42
1
1
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,
chsh
) it would/should have warned you about the problem.– Kurtis Rader
Jan 18 at 5:42
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,
chsh
) it would/should have warned you about the problem.– Kurtis Rader
Jan 18 at 5:42
add a comment |
2 Answers
2
active
oldest
votes
You need to add this shell to /etc/shells
. The manual reads:
/etc/shells
is a text file which contains the full pathnames of valid login shells. This file is consulted bychsh(1)
and available to be queried by other programs.
Be aware that there are programs which consult this file to find out if a user is a normal user; for example, FTP daemons traditionally disallow access to users with shells not included in this file.
In my Kubuntu this is the content of /etc/shells
:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh
/usr/bin/fish
/bin/tcsh
/usr/bin/tcsh
As you can see its format is quite self-explanatory. In my case fish
is there as /usr/bin/fish
. Make sure the right path in your case is /bin/fish
and add it to your file.
Note it's better to use chsh
to change your login shell, instead of editing /etc/passwd
by hand. If you did
chsh -s /bin/fish
you would probably get
chsh: /bin/fish is an invalid shell
Investigating this issue (with man 1 chsh
) would probably reveal the existence of /etc/shells
to you.
The tool is designed to be run by unprivileged users. If the content of /etc/shells
(which is governed by root) is sane, then it's usually impossible for users to lock themselves out. By editing /etc/passwd
you may not only lock yourself out like you did; you may (by mistake) break more.
add a comment |
I believe Linux requires that all valid login shells be listed in /etc/shells
. Add fish
to that file before setting it as your login shell. Be sure to use its full correct path.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1395540%2ffailed-to-login-after-setting-fish-as-default-shell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to add this shell to /etc/shells
. The manual reads:
/etc/shells
is a text file which contains the full pathnames of valid login shells. This file is consulted bychsh(1)
and available to be queried by other programs.
Be aware that there are programs which consult this file to find out if a user is a normal user; for example, FTP daemons traditionally disallow access to users with shells not included in this file.
In my Kubuntu this is the content of /etc/shells
:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh
/usr/bin/fish
/bin/tcsh
/usr/bin/tcsh
As you can see its format is quite self-explanatory. In my case fish
is there as /usr/bin/fish
. Make sure the right path in your case is /bin/fish
and add it to your file.
Note it's better to use chsh
to change your login shell, instead of editing /etc/passwd
by hand. If you did
chsh -s /bin/fish
you would probably get
chsh: /bin/fish is an invalid shell
Investigating this issue (with man 1 chsh
) would probably reveal the existence of /etc/shells
to you.
The tool is designed to be run by unprivileged users. If the content of /etc/shells
(which is governed by root) is sane, then it's usually impossible for users to lock themselves out. By editing /etc/passwd
you may not only lock yourself out like you did; you may (by mistake) break more.
add a comment |
You need to add this shell to /etc/shells
. The manual reads:
/etc/shells
is a text file which contains the full pathnames of valid login shells. This file is consulted bychsh(1)
and available to be queried by other programs.
Be aware that there are programs which consult this file to find out if a user is a normal user; for example, FTP daemons traditionally disallow access to users with shells not included in this file.
In my Kubuntu this is the content of /etc/shells
:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh
/usr/bin/fish
/bin/tcsh
/usr/bin/tcsh
As you can see its format is quite self-explanatory. In my case fish
is there as /usr/bin/fish
. Make sure the right path in your case is /bin/fish
and add it to your file.
Note it's better to use chsh
to change your login shell, instead of editing /etc/passwd
by hand. If you did
chsh -s /bin/fish
you would probably get
chsh: /bin/fish is an invalid shell
Investigating this issue (with man 1 chsh
) would probably reveal the existence of /etc/shells
to you.
The tool is designed to be run by unprivileged users. If the content of /etc/shells
(which is governed by root) is sane, then it's usually impossible for users to lock themselves out. By editing /etc/passwd
you may not only lock yourself out like you did; you may (by mistake) break more.
add a comment |
You need to add this shell to /etc/shells
. The manual reads:
/etc/shells
is a text file which contains the full pathnames of valid login shells. This file is consulted bychsh(1)
and available to be queried by other programs.
Be aware that there are programs which consult this file to find out if a user is a normal user; for example, FTP daemons traditionally disallow access to users with shells not included in this file.
In my Kubuntu this is the content of /etc/shells
:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh
/usr/bin/fish
/bin/tcsh
/usr/bin/tcsh
As you can see its format is quite self-explanatory. In my case fish
is there as /usr/bin/fish
. Make sure the right path in your case is /bin/fish
and add it to your file.
Note it's better to use chsh
to change your login shell, instead of editing /etc/passwd
by hand. If you did
chsh -s /bin/fish
you would probably get
chsh: /bin/fish is an invalid shell
Investigating this issue (with man 1 chsh
) would probably reveal the existence of /etc/shells
to you.
The tool is designed to be run by unprivileged users. If the content of /etc/shells
(which is governed by root) is sane, then it's usually impossible for users to lock themselves out. By editing /etc/passwd
you may not only lock yourself out like you did; you may (by mistake) break more.
You need to add this shell to /etc/shells
. The manual reads:
/etc/shells
is a text file which contains the full pathnames of valid login shells. This file is consulted bychsh(1)
and available to be queried by other programs.
Be aware that there are programs which consult this file to find out if a user is a normal user; for example, FTP daemons traditionally disallow access to users with shells not included in this file.
In my Kubuntu this is the content of /etc/shells
:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/tmux
/bin/zsh
/usr/bin/zsh
/usr/bin/fish
/bin/tcsh
/usr/bin/tcsh
As you can see its format is quite self-explanatory. In my case fish
is there as /usr/bin/fish
. Make sure the right path in your case is /bin/fish
and add it to your file.
Note it's better to use chsh
to change your login shell, instead of editing /etc/passwd
by hand. If you did
chsh -s /bin/fish
you would probably get
chsh: /bin/fish is an invalid shell
Investigating this issue (with man 1 chsh
) would probably reveal the existence of /etc/shells
to you.
The tool is designed to be run by unprivileged users. If the content of /etc/shells
(which is governed by root) is sane, then it's usually impossible for users to lock themselves out. By editing /etc/passwd
you may not only lock yourself out like you did; you may (by mistake) break more.
edited Jan 17 at 22:02
answered Jan 17 at 21:42
Kamil MaciorowskiKamil Maciorowski
27.8k156184
27.8k156184
add a comment |
add a comment |
I believe Linux requires that all valid login shells be listed in /etc/shells
. Add fish
to that file before setting it as your login shell. Be sure to use its full correct path.
add a comment |
I believe Linux requires that all valid login shells be listed in /etc/shells
. Add fish
to that file before setting it as your login shell. Be sure to use its full correct path.
add a comment |
I believe Linux requires that all valid login shells be listed in /etc/shells
. Add fish
to that file before setting it as your login shell. Be sure to use its full correct path.
I believe Linux requires that all valid login shells be listed in /etc/shells
. Add fish
to that file before setting it as your login shell. Be sure to use its full correct path.
answered Jan 17 at 21:42
SpiffSpiff
77.8k10118163
77.8k10118163
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1395540%2ffailed-to-login-after-setting-fish-as-default-shell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Your primary mistake was editing /etc/passd by hand. Had you used the appropriate command to change your login shell (e.g.,
chsh
) it would/should have warned you about the problem.– Kurtis Rader
Jan 18 at 5:42