您好,登錄后才能下訂單哦!
問(wèn)題描述:
Linux 操作系統(tǒng)連接用戶時(shí)報(bào)錯(cuò):【This account is currently not available.】
[root@sam ~]# su - mysql
This account is currently not available.
問(wèn)題分析:
查看賬號(hào)(用戶)信息
使用Vipw mysql命令或 cat /etc/passwd文件
發(fā)現(xiàn)mysql用戶后為‘/sbin/nologin’,需要修改為‘/bin/bash’后方可連接使用。
[root@sam ~]# cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
……
mysql:x:500:500::/home/mysql:/sbin/nologin
處理方法:
usermod -s /bin/bash mysql
修改前:
mysql:x:500:500::/home/mysql:/sbin/nologin
修改后:
mysql:x:500:500::/home/mysql:/bin/bash
Repaired驗(yàn)證:
[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)
總結(jié):修改前要記錄相關(guān)信息,以便回退使用。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。