This account is currently not available – SSH Login Problem with VestaCP new User
I have created a new VestaCP user beside admin to Host all my websites under the new user account. The new user works fine, I can access the website, I can log in vestaCP with the new user account, use FTP, add a new website, but what I cannot do is ssh to the new user. when trying to login via SSH or trying to “su” to new VestaCP user I always get this error “This account is currently not available”.
“This account is currently not available” error means what it 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 (use root account) file and see the shell which is set for the desired user.
root@xxxx:~# nano ~/etc/passwd
If the shell is set to “/bin/false” or “/sbin/nologin” you have confirmed the problem.
Here is an example of users admin and tawfiq
admin:x:1000:1000:xxxx:/home/admin:/bin/bash
tawfiq:x:1001:1001:xxxx:/home/tawfiq:/bin/nologin
How to fix “This account is currently not available” error?
- Login to VestaCP admin panel with admin account.
- Goto User
- Edit Specific user
- Change SSH Access from “nologin” to “bash”
It fix my ssh login issue for new vestaCP user. I hope it works for you also. Thanks for reading.
It does not at all mean what it says. “This account is unavailable because no valid shell was configured” would be significantly clearer
I have done this for ubuntu user and there is no other user for the ec2 instance. And now I am not able to login. Is there a way to restore ec2 instance to previous state.
I found this article very helpful. Thankyou
I just added the ‘-s /bin/bash’ flag because I only need temporary access to the account.
su -s /bin/bash – nagios