Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem of This account is currently not available when switching users under linux

Shulou Source: shulou.com Published: 2022-06-02 08:21:27 11月23日 Update

This article mainly introduces "how to solve the problem of This account is currently not available when switching users under linux". In daily operation, I believe that many people have doubts about how to solve problems when switching users under linux. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to solve This account is currently not available when switching users under linux". Next, please follow the editor to study!

There was a "This account is currently not available" error when switching users under a new server today.

After searching the Internet, it was found that the problem was that the user's shell was prohibited from logging in.

Solution:

For example, there was a problem when I was su www-data.

Use vi to see the account information of www-data

# cat / etc/passwd | grep www-data

It is found that its shell is "/ sbin / nologin" and needs to be changed to "/ bin/bash".

# vipw / etc/passwd

After the modification, save and exit

If you use su www-data like this, you can easily get in.

At this point, the study on "how to solve the problem of This account is currently not available for switching users under linux" is over. I hope to be able to solve everyone's doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Users switching learning questions time more help practical next information methods articles methods servers theory knowledge articles websites materials follow Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Xiaomi NVidia Huawei