LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "Interactive Shell not available." for user account (https://www.linuxquestions.org/questions/linux-newbie-8/interactive-shell-not-available-for-user-account-4175613355/)

spankbot 09-06-2017 04:33 PM

"Interactive Shell not available." for user account
 
I have a local user account which is unusable. via ssh or su

All I get is:

Interactive Shell not available.

and then disconnect. I used the pwck but it found no issues.

This is Centos 6.

wpeckham 09-06-2017 06:57 PM

Quote:

Originally Posted by spankbot (Post 5756325)
I have a local user account which is unusable. via ssh or su

All I get is:

Interactive Shell not available.

and then disconnect. I used the pwck but it found no issues.

This is Centos 6.

If you have "finger" installed, run the finger command against that user.
look at the shell, and see if that is one of the installed and authorized shells. This check does not find invisible characters.

Also, or instead, you can run
Code:

cat -vte /etc/passwd|grep ^USER
where USER is replaced with
the logon name of the user. The shell should be between the last ":" on the line and the "$" that marks
the end of the line.
Examine the shell for correctness, and missing or additional characters. This test will find invisible characters.

Please come back here and let us know what you find out.

andros705 09-06-2017 06:59 PM

What shell does the user have set?
Try this as root:
Code:

getent passwd <USER>
What is the last field?
Is it:
Code:

/bin/nologin
What is the sshd configuration?

We need more information!

MadeInGermany 09-08-2017 02:43 AM

Code:

getent passwd USER
is the command to grep the effective passwd line for USER.
The last field is the login shell.
Can it be started? Is it listed as a valid login shell in /etc/shells?

sundialsvcs 09-12-2017 11:36 AM

I've seen this when I fat-fingered a name when trying to set up a service user. :banghead: I don't believe that the user-management tools actually check to see if the specified shell-program file exists.

Anyway – in order for a user to log on, Linux must create a shell-process for him ... and it finds that it can't do so.


All times are GMT -5. The time now is 10:23 AM.