Get the App
SLTechnology News&Howtos  ›  Servers  › 

[ERROR] su user News & # 039 This account is currently not available' error for linux

Shulou Source: shulou.com Published: 2022-06-02 07:28:47 11月23日 Update

Problem description:

Linux operating system connection user Times error: [This account is currently not available.]

[root@sam ~] # su-mysql

This account is currently not available.

Problem analysis:

View account (user) information

Use the Vipw mysql command or the cat / etc/passwd file

When mysql users are found,'/ sbin/nologin', needs to be modified to'/ bin/bash' before it can be connected and used.

[root@sam ~] # cat / etc/passwd

Root:x:0:0:root:/root:/bin/bash

……

Mysql:x:500:500::/home/mysql:/sbin/nologin

Treatment method:

Direct command try:

Usermod-s / bin/bash mysql

Modify the'/ etc/passwd' file:

Before modification:

Mysql:x:500:500::/home/mysql:/sbin/nologin

After modification:

Mysql:x:500:500::/home/mysql:/bin/bash

Repaired authentication:

[root@sam ~] # cat / etc/passwd

Root:x:0:0:root:/root:/bin/bash

……

Mysql:x:500:500::/home/mysql:/bin/bash

[root@sam ~] # su-mysql

[mysql@sam ~] $id

Uid=500 (mysql) gid=500 (mysql) groups=500 (mysql)

Summary: the relevant information should be recorded before modification for fallback use.

Tags: Users information commands files problems operating systems methods times systems accounts analysis processing validation errors Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information MariaDB Shulou Tech Info OPPO Reno Shulou Technology