Cannot log in if shell is set to /usr/bin/bash

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












So I just ran into an interesting issue. On Arch Linux, if I create a user that uses a shell from /usr/bin they cannot log in. I create the user with:



useradd -m -G wheel -s /usr/bin/bash username



and when they try to log in, they get 'Login Incorrect'. But if I edit /etc/passwd and change the shell to /bin/bash, everything works fine.



Any ideas what's going on here? Thanks!







share|improve this question















  • 4




    Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
    – Kusalananda
    May 30 at 13:00










  • Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
    – ilkkachu
    May 30 at 16:04















up vote
0
down vote

favorite












So I just ran into an interesting issue. On Arch Linux, if I create a user that uses a shell from /usr/bin they cannot log in. I create the user with:



useradd -m -G wheel -s /usr/bin/bash username



and when they try to log in, they get 'Login Incorrect'. But if I edit /etc/passwd and change the shell to /bin/bash, everything works fine.



Any ideas what's going on here? Thanks!







share|improve this question















  • 4




    Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
    – Kusalananda
    May 30 at 13:00










  • Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
    – ilkkachu
    May 30 at 16:04













up vote
0
down vote

favorite









up vote
0
down vote

favorite











So I just ran into an interesting issue. On Arch Linux, if I create a user that uses a shell from /usr/bin they cannot log in. I create the user with:



useradd -m -G wheel -s /usr/bin/bash username



and when they try to log in, they get 'Login Incorrect'. But if I edit /etc/passwd and change the shell to /bin/bash, everything works fine.



Any ideas what's going on here? Thanks!







share|improve this question











So I just ran into an interesting issue. On Arch Linux, if I create a user that uses a shell from /usr/bin they cannot log in. I create the user with:



useradd -m -G wheel -s /usr/bin/bash username



and when they try to log in, they get 'Login Incorrect'. But if I edit /etc/passwd and change the shell to /bin/bash, everything works fine.



Any ideas what's going on here? Thanks!









share|improve this question










share|improve this question




share|improve this question









asked May 30 at 12:52









Chris

27728




27728







  • 4




    Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
    – Kusalananda
    May 30 at 13:00










  • Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
    – ilkkachu
    May 30 at 16:04













  • 4




    Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
    – Kusalananda
    May 30 at 13:00










  • Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
    – ilkkachu
    May 30 at 16:04








4




4




Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
– Kusalananda
May 30 at 13:00




Is there an executable called bash in /usr/bin? Is this also listed in the list of valid login shells (/etc/shells)?
– Kusalananda
May 30 at 13:00












Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
– ilkkachu
May 30 at 16:04





Also, check the logs. On Debian/Ubuntu, the authentication stuff goes to /var/log/auth.log and any messages from PAM modules should be there, too. On Arch, they might be somewhere else, or perhaps you'll just have to go through journalctl: unix.stackexchange.com/questions/114189/where-are-my-sshd-logs
– ilkkachu
May 30 at 16:04











2 Answers
2






active

oldest

votes

















up vote
3
down vote



accepted










As the Arch Wiki makes clear:




Warning: In order to be able to log in, the login shell must be one of
those listed in /etc/shells, otherwise the PAM module pam_shell will
deny the login request. In particular, do not use the /usr/bin/bash
path instead of /bin/bash
, unless it is properly configured in
/etc/shells.




cat /etc/shells 
#
# /etc/shells
#

/bin/sh
/bin/bash





share|improve this answer





















  • Truthfully, I completely forgot that /etc/shells existed. Thank you!
    – Chris
    Jun 4 at 23:50

















up vote
-1
down vote













If bash is in /bin/bash and /bin and /usr/bin are not linked together, then the login program cannot start the shell if you specify a wrong path to Bash.



If the binares are linked together, then you need to edit /etc/shells to include both variants.






share|improve this answer























  • The binaries are installed to /usr/bin and are linked to /bin
    – Chris
    May 30 at 13:21










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446906%2fcannot-log-in-if-shell-is-set-to-usr-bin-bash%23new-answer', 'question_page');

);

Post as a guest






























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote



accepted










As the Arch Wiki makes clear:




Warning: In order to be able to log in, the login shell must be one of
those listed in /etc/shells, otherwise the PAM module pam_shell will
deny the login request. In particular, do not use the /usr/bin/bash
path instead of /bin/bash
, unless it is properly configured in
/etc/shells.




cat /etc/shells 
#
# /etc/shells
#

/bin/sh
/bin/bash





share|improve this answer





















  • Truthfully, I completely forgot that /etc/shells existed. Thank you!
    – Chris
    Jun 4 at 23:50














up vote
3
down vote



accepted










As the Arch Wiki makes clear:




Warning: In order to be able to log in, the login shell must be one of
those listed in /etc/shells, otherwise the PAM module pam_shell will
deny the login request. In particular, do not use the /usr/bin/bash
path instead of /bin/bash
, unless it is properly configured in
/etc/shells.




cat /etc/shells 
#
# /etc/shells
#

/bin/sh
/bin/bash





share|improve this answer





















  • Truthfully, I completely forgot that /etc/shells existed. Thank you!
    – Chris
    Jun 4 at 23:50












up vote
3
down vote



accepted







up vote
3
down vote



accepted






As the Arch Wiki makes clear:




Warning: In order to be able to log in, the login shell must be one of
those listed in /etc/shells, otherwise the PAM module pam_shell will
deny the login request. In particular, do not use the /usr/bin/bash
path instead of /bin/bash
, unless it is properly configured in
/etc/shells.




cat /etc/shells 
#
# /etc/shells
#

/bin/sh
/bin/bash





share|improve this answer













As the Arch Wiki makes clear:




Warning: In order to be able to log in, the login shell must be one of
those listed in /etc/shells, otherwise the PAM module pam_shell will
deny the login request. In particular, do not use the /usr/bin/bash
path instead of /bin/bash
, unless it is properly configured in
/etc/shells.




cat /etc/shells 
#
# /etc/shells
#

/bin/sh
/bin/bash






share|improve this answer













share|improve this answer



share|improve this answer











answered May 30 at 17:42









jasonwryan

46.5k14126174




46.5k14126174











  • Truthfully, I completely forgot that /etc/shells existed. Thank you!
    – Chris
    Jun 4 at 23:50
















  • Truthfully, I completely forgot that /etc/shells existed. Thank you!
    – Chris
    Jun 4 at 23:50















Truthfully, I completely forgot that /etc/shells existed. Thank you!
– Chris
Jun 4 at 23:50




Truthfully, I completely forgot that /etc/shells existed. Thank you!
– Chris
Jun 4 at 23:50












up vote
-1
down vote













If bash is in /bin/bash and /bin and /usr/bin are not linked together, then the login program cannot start the shell if you specify a wrong path to Bash.



If the binares are linked together, then you need to edit /etc/shells to include both variants.






share|improve this answer























  • The binaries are installed to /usr/bin and are linked to /bin
    – Chris
    May 30 at 13:21














up vote
-1
down vote













If bash is in /bin/bash and /bin and /usr/bin are not linked together, then the login program cannot start the shell if you specify a wrong path to Bash.



If the binares are linked together, then you need to edit /etc/shells to include both variants.






share|improve this answer























  • The binaries are installed to /usr/bin and are linked to /bin
    – Chris
    May 30 at 13:21












up vote
-1
down vote










up vote
-1
down vote









If bash is in /bin/bash and /bin and /usr/bin are not linked together, then the login program cannot start the shell if you specify a wrong path to Bash.



If the binares are linked together, then you need to edit /etc/shells to include both variants.






share|improve this answer















If bash is in /bin/bash and /bin and /usr/bin are not linked together, then the login program cannot start the shell if you specify a wrong path to Bash.



If the binares are linked together, then you need to edit /etc/shells to include both variants.







share|improve this answer















share|improve this answer



share|improve this answer








edited May 30 at 13:34


























answered May 30 at 13:01









schily

8,63821435




8,63821435











  • The binaries are installed to /usr/bin and are linked to /bin
    – Chris
    May 30 at 13:21
















  • The binaries are installed to /usr/bin and are linked to /bin
    – Chris
    May 30 at 13:21















The binaries are installed to /usr/bin and are linked to /bin
– Chris
May 30 at 13:21




The binaries are installed to /usr/bin and are linked to /bin
– Chris
May 30 at 13:21












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f446906%2fcannot-log-in-if-shell-is-set-to-usr-bin-bash%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)