[ERROR] su user News & # 039 This account is currently not available' error for linux
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.