Share, , Google Plus, Pinterest,

Print

Posted in:

This account is currently not available – Login Problem

Have you ever got an error “This account is currently not available” when trying to login via SSH or trying to “su” to certain user? Read here what this error means and how you can easily fix it!

Example of the error:

[mitch@foohost ~]$ ssh geekpeek@foo1
geekpeek@foo1 password:
Last login: Fri Jun 21 08:03:57 2013 from mitch@foohost.net
This account is currently not available.
Connection to foo1 closed.
User Login - This account is currently not available
User Login – This account is currently not available

What does “This account is currently not available” error mean?

This account is currently not available” error means what is says.The account you are trying to “su” to or trying to login with is currently not available because there is no valid shell set for this user.

You can check this by looking into /etc/passwd file and see the shell which is set for the desired user. If the shell is set to “/bin/false” or “/sbin/nologin” you have confirmed the problem.

Here is an example of users geekpeek and geekpeeknet with “/bin/false” and “/sbin/nologin” shell.

geekpeek:x:500:500::/home/geekpeek:/bin/false
geekpeeknet:x:501:501::/home/geekpeeknet:/sbin/nologin

How to fix “This account is currently not available” error?

You can fix this error by setting a shell for the desired user. You can do this via “chsh” command or by editing /etc/passwd file.

When using “chsh” command you should do something like this (you should run this as root or via sudo!):

[root@foo1 ~]# chsh -s /bin/bash geekpeek
[root@foo1 ~]# chsh -s /bin/bash geekpeeknet

 

After this /etc/passwd user line should look something like this:

geekpeek:x:500:500::/home/geekpeek:/bin/bash
geekpeeknet:x:501:501::/home/geekpeeknet:/sbin/bash

 

If not, try to edit /etc/passwd file manually and setting the desired shell. Now you should be able to login to your user account via SSH or “su”.

If you do not know which shells are available on your system you can run a command “chsh” or “cat /etc/shells” as seen below!

[root@foo1 /]# chsh --list-shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/dash

[root@foo1 /]# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/dash

 

Share, , Google Plus, Pinterest,

2 Comments

Leave a Reply

2 Pings & Trackbacks

  1. Pingback:

  2. Pingback: