Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report