su - xxx Could not create session
Linux無法su,排查問題為以下幾步
(1)su - xxx Could not create session
# 檢視/var/log/secure安全日誌
cat /var/log/secure
# 根據日誌提示illegal非法模組搜尋/etc/pam.d/下哪個配置檔案配置不正確
find ./* -name \* -type f -print|xargs grep "M1-0"
# 我遇到問題secure日誌中報M1-0,所以查詢M1-0設定即可。
# 可以找到/etc/pam.d/postlogin檔案未使用#%註釋掉該模組,導致語法錯誤參照其他行語法 新增即可。
(2)su - xxx Could not create session not permitted
# 無法su - 檢視/var/log/secure日誌
cat /var/log/secure
# 提示pam_limits模組限制
su: pam_limits(su-l:session):Could not set limit for 'nofile':not permitted
#查詢該模組
cd /etc/pam.d/ grep -i "pam_limits" *,查詢是否有pam.d相關模組限制 檢視作業系統/etc/sysctl.conf相關設定有無限制。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31439444/viewspace-2723319/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- could not connect to redis Instance at xxx.xxx.xxx.xxx:6379Redis
- 解決“su: cannot open session: Permission denied”Session
- J2SE - Could not find the main class: xxx.xxx.Program will exitAI
- pg_basebackup 報錯could not create directory
- hadoop啟動時,報ssh: Could not resolve hostname xxx: NamHadoop
- Many To Many could not initialize proxy – no Session的解決方法Session
- MySQL 8.0版本連線報錯:Could not create coMySql
- [20201120]pam_systemd(crondsession) Failed to create session Access denied.txtSessionAI
- Could not obtain transaction-synchronized Session for current thread原因及解決方案AIsynchronizedSessionthread
- 使用req.session.xxx時出現 Cannot set property ‘xxxx‘ of undefinedSessionUndefined
- 異常資訊解決:Could not obtain transaction-synchronized Session for current threadAIsynchronizedSessionthread
- mac 下vscode 更新時提示:Could not create temporary directory: 許可權被拒絕MacVSCode
- maven專案構建報錯:Could not find artifact com.xxx.cloud:xxx-cloud:pom:1.0-SNAPSHOT and 'parent.relativePath' points at wrong local POMMavenCloud
- C++ vector<std::tuple<XXX, XXX, XXX>>C++
- Linux下su與su -命令的本質區別Linux
- Linux命令su、sudo、sudo su、sudo -i使用和區別Linux
- 啟動Jmeter5.3 後彈出警告: WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0JMeterJava
- hive on spark:return code 30041 Failed to create Spark client for Spark session原因分析及解決方案探尋HiveSparkAIclientSession
- Linux基礎命令---suLinux
- create_singlethread_workqueue, create_workqueuethread
- Linux虛擬機器配置IP時提示:determining ip information for ip xxx.xxx.xxx.xxx address is alreadyLinux虛擬機ORM
- Permission denied:user=xxx,access=WRITE,inode=xxx
- 求助:環境正常,xcodebuild 也執行成功了,但是使用 appium desktop 的時候,出現:Could not start sessionXCodeUIAPPSession
- sudo su 和 sudo -s【轉】
- QT中error: xxx does not name a type xxx錯誤QTError
- su軟體怎麼安裝
- No instances available for XXXAI
- SQL__CREATESQL
- Object.create()Object
- create-a-page
- create-a-document
- Docker create命令Docker
- create index .. onlineIndex
- session和v$session說明Session
- laravel session 與 php session配置LaravelSessionPHP
- apt could not get lockAPT
- vue Cannot find module @/xxx/xxx.ts or its corresponding typeVue
- SessionSession