Error: “The value for the SHELL variable was not found the /etc/shells file” when running `pkexec`
On Ubuntu 14.04, I am getting the error "The value for the SHELL variable was not found the /etc/shells file" when running pkexec to run a script.
Most likely this error started after I removed the fish shell, that was set as my default shell.
The content of /etc/shells is:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
How may I fix this?
command-line bash pkexec
add a comment |
On Ubuntu 14.04, I am getting the error "The value for the SHELL variable was not found the /etc/shells file" when running pkexec to run a script.
Most likely this error started after I removed the fish shell, that was set as my default shell.
The content of /etc/shells is:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
How may I fix this?
command-line bash pkexec
add a comment |
On Ubuntu 14.04, I am getting the error "The value for the SHELL variable was not found the /etc/shells file" when running pkexec to run a script.
Most likely this error started after I removed the fish shell, that was set as my default shell.
The content of /etc/shells is:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
How may I fix this?
command-line bash pkexec
On Ubuntu 14.04, I am getting the error "The value for the SHELL variable was not found the /etc/shells file" when running pkexec to run a script.
Most likely this error started after I removed the fish shell, that was set as my default shell.
The content of /etc/shells is:
# /etc/shells: valid login shells
/bin/sh
/bin/dash
/bin/bash
/bin/rbash
How may I fix this?
command-line bash pkexec
command-line bash pkexec
edited Jan 5 '16 at 18:06
kos
25.8k871121
25.8k871121
asked Jan 5 '16 at 17:16
J. DoeJ. Doe
184
184
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The problem is this one: pkexec is accessing $SHELL to determine which shell to use to evaluate the remainder of the command; since you uninstalled fish but didn't do anything else, $SHELL still contains /usr/bin/fish, but pkexec doesn't deem /usr/bin/fish as a valid shell, since /usr/bin/fish has been removed from /etc/shells.
You need to do these two things:
Set a new shell for your user, so that the next time the environment is load
$SHELLwill contain a path to a valid shell. E.g. to set Bash as the new shell for your user (replaceuserwith your user's username):
sudo chsh -s /bin/bash user
Log out / log in to reload the environment so that
$SHELLcontains the path to the new shell for your user.
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, samepkexecerror.
– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.sudo chsh -s /bin/bashchanges the shell for root. Dosudo chsh -s /bin/bash user, whereuseris your username instead.
– kos
Jan 5 '16 at 20:34
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f717317%2ferror-the-value-for-the-shell-variable-was-not-found-the-etc-shells-file-whe%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The problem is this one: pkexec is accessing $SHELL to determine which shell to use to evaluate the remainder of the command; since you uninstalled fish but didn't do anything else, $SHELL still contains /usr/bin/fish, but pkexec doesn't deem /usr/bin/fish as a valid shell, since /usr/bin/fish has been removed from /etc/shells.
You need to do these two things:
Set a new shell for your user, so that the next time the environment is load
$SHELLwill contain a path to a valid shell. E.g. to set Bash as the new shell for your user (replaceuserwith your user's username):
sudo chsh -s /bin/bash user
Log out / log in to reload the environment so that
$SHELLcontains the path to the new shell for your user.
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, samepkexecerror.
– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.sudo chsh -s /bin/bashchanges the shell for root. Dosudo chsh -s /bin/bash user, whereuseris your username instead.
– kos
Jan 5 '16 at 20:34
add a comment |
The problem is this one: pkexec is accessing $SHELL to determine which shell to use to evaluate the remainder of the command; since you uninstalled fish but didn't do anything else, $SHELL still contains /usr/bin/fish, but pkexec doesn't deem /usr/bin/fish as a valid shell, since /usr/bin/fish has been removed from /etc/shells.
You need to do these two things:
Set a new shell for your user, so that the next time the environment is load
$SHELLwill contain a path to a valid shell. E.g. to set Bash as the new shell for your user (replaceuserwith your user's username):
sudo chsh -s /bin/bash user
Log out / log in to reload the environment so that
$SHELLcontains the path to the new shell for your user.
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, samepkexecerror.
– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.sudo chsh -s /bin/bashchanges the shell for root. Dosudo chsh -s /bin/bash user, whereuseris your username instead.
– kos
Jan 5 '16 at 20:34
add a comment |
The problem is this one: pkexec is accessing $SHELL to determine which shell to use to evaluate the remainder of the command; since you uninstalled fish but didn't do anything else, $SHELL still contains /usr/bin/fish, but pkexec doesn't deem /usr/bin/fish as a valid shell, since /usr/bin/fish has been removed from /etc/shells.
You need to do these two things:
Set a new shell for your user, so that the next time the environment is load
$SHELLwill contain a path to a valid shell. E.g. to set Bash as the new shell for your user (replaceuserwith your user's username):
sudo chsh -s /bin/bash user
Log out / log in to reload the environment so that
$SHELLcontains the path to the new shell for your user.
The problem is this one: pkexec is accessing $SHELL to determine which shell to use to evaluate the remainder of the command; since you uninstalled fish but didn't do anything else, $SHELL still contains /usr/bin/fish, but pkexec doesn't deem /usr/bin/fish as a valid shell, since /usr/bin/fish has been removed from /etc/shells.
You need to do these two things:
Set a new shell for your user, so that the next time the environment is load
$SHELLwill contain a path to a valid shell. E.g. to set Bash as the new shell for your user (replaceuserwith your user's username):
sudo chsh -s /bin/bash user
Log out / log in to reload the environment so that
$SHELLcontains the path to the new shell for your user.
edited Jan 5 '16 at 20:35
answered Jan 5 '16 at 18:02
koskos
25.8k871121
25.8k871121
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, samepkexecerror.
– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.sudo chsh -s /bin/bashchanges the shell for root. Dosudo chsh -s /bin/bash user, whereuseris your username instead.
– kos
Jan 5 '16 at 20:34
add a comment |
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, samepkexecerror.
– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.sudo chsh -s /bin/bashchanges the shell for root. Dosudo chsh -s /bin/bash user, whereuseris your username instead.
– kos
Jan 5 '16 at 20:34
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, same
pkexec error.– J. Doe
Jan 5 '16 at 20:28
This didn't work for me. Without sudo, I received: "You may not change the shell for 'name'." With sudo no error but after loging back in, same
pkexec error.– J. Doe
Jan 5 '16 at 20:28
@J.Doe Right.
sudo chsh -s /bin/bash changes the shell for root. Do sudo chsh -s /bin/bash user, where user is your username instead.– kos
Jan 5 '16 at 20:34
@J.Doe Right.
sudo chsh -s /bin/bash changes the shell for root. Do sudo chsh -s /bin/bash user, where user is your username instead.– kos
Jan 5 '16 at 20:34
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f717317%2ferror-the-value-for-the-shell-variable-was-not-found-the-etc-shells-file-whe%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