【ERROR】su user報'This account is currently not available'錯誤 for linux
問題描述:
Linux 作業系統連線使用者時報錯:【This account is currently not available.】
[root@sam ~]# su - mysql
This account is currently not available.
問題分析:
檢視賬號(使用者)資訊
使用Vipw mysql命令或 cat /etc/passwd檔案
發現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
- 修改‘/etc/passwd’檔案:
修改前:
mysql:x:500:500::/home/mysql:/sbin/nologin
修改後:
mysql:x:500:500::/home/mysql:/bin/bash
Repaired驗證:
[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)
總結:修改前要記錄相關資訊,以便回退使用。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31444259/viewspace-2152099/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux錯誤 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)LinuxErrorlocalhost
- User Account Control
- Vultr賬號被封:Your account is currently closed
- k8s kubectl top pod報錯error Metrics API not availableK8SErrorAPIAI
- linux CentOS出現Error: xz compression not availableLinuxCentOSErrorAI
- Linux yum安裝httpd報錯 No package httpd available ?LinuxhttpdPackageAI
- Spring:錯誤No bean named 'xxxxxxx' availableSpringBeanAI
- kafka 錯誤: larger than available brokersKafkaAI
- 報錯”ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: NO)”Errorlocalhost
- spring中No bean named xxx available錯誤SpringBeanAI
- Linux的wheel組:LINUX下使用者使用su命令切換使用者報錯su: Permission deniedLinux
- Laravel NO_AUTO_CREATE_USER 錯誤Laravel
- 使用Boost庫報error C4996錯誤Error996
- MySQL error 錯 誤 碼MySqlError
- PostgreSQL error 錯誤碼SQLError
- Error page: / Error infos: DedeCms錯誤警告Error
- linux系統報錯AER PCIe Bus ErrorLinuxError
- Error Curves——錯誤曲線Error
- No Bean named 'Xxx' available 異常報錯BeanAI
- 使用@Service註解出現No bean named 'xxxx' available]錯誤BeanAI
- libtorch使用model.forward報std::runtime_error錯誤ForwardError
- linux安裝thefuck報gcc錯誤LinuxGC
- Arkts錄製音訊報錯 ERROR: The reason and usedScene attributes are mandatory for user_grant permissions.音訊Error
- MySQL建立使用者報錯 ERROR 1396 (HY000): Operation CREATE USER failed for 'afei'@'%'MySqlErrorAI
- Angular 錯誤訊息:ERROR Error NullInjectorError No provider for XXAngularErrorNullIDE
- ERROR 1045 (28000): ProxySQL Error: 報錯ErrorSQL
- Maven專案報錯:No bean named 'xxxxxx' availableMavenBeanAI
- Js錯誤Error物件詳解JSError物件
- Fatal NI connect error 12170 錯誤Error
- 15-錯誤處理(Error)Error
- dedecms 搬家 / dedecms error warning!錯誤Error
- HTTP 錯誤 500.19- Internal Server Error 錯誤解決方法HTTPServerError
- 執行SQL發生錯誤!錯誤:disk I/O errorSQLError
- Installation failed with message INSTALL_FAILED_USER_RESTRICTED錯誤AIREST
- idea maven搭建spring報錯:No bean named 'xxx' availableIdeaMavenSpringBeanAI
- messages日誌出現Currently unreadable (pending) sectors扇區不可讀的錯誤
- MySQL 5.7 建立使用者報錯 ERROR 1805 (HY000): Column count of mysql.user is wrongMySqlError
- MongoDB 備份恢復啟動後執行操作報錯:Error:couldn't add user:not masterMongoDBErrorAST