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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- su - root could not open sessionSession
- su的時候報:could not open sessionSession
- Linux su 切換到某使用者時報錯: could not open sessionLinuxSession
- could not initialize proxy - no SessionSession
- 解決“su: cannot open session: Permission denied”Session
- pg_basebackup 報錯could not create directory
- could not connect to redis Instance at xxx.xxx.xxx.xxx:6379Redis
- could not autowire. No beans of 'xxxx' 問題解決Bean
- a commponent required a bean of type XXXXXX that could not be found-2022新專案UIBean
- J2SE - Could not find the main class: xxx.xxx.Program will exitAI
- 錯誤記錄(八)could not initialize proxy - no SessionSession
- RMAN-06403: could not obtain a fully authorized sessionAIZedSession
- Could not load file or assembly 'xxx' or one of its dependencies.
- 使用req.session.xxx時出現 Cannot set property ‘xxxx‘ of undefinedSessionUndefined
- MySQL 8.0版本連線報錯:Could not create coMySql
- Many To Many could not initialize proxy – no Session的解決方法Session
- create CompassSession session fail, compass init is null!!!SessionAINull
- PL/SQL Developer啟動時報錯,Initialization error could not load xxxx\oci.dllSQLDeveloperError
- su和su - 的區別
- springboot報錯無法讀取配置檔案中的屬性:Could not resolve placeholder ‘xxxx‘ in value “${xxxx}Spring Boot
- hadoop啟動時,報ssh: Could not resolve hostname xxx: NamHadoop
- 異常資訊解決:Could not obtain transaction-synchronized Session for current threadAIsynchronizedSessionthread
- Could not obtain transaction-synchronized Session for current thread原因及解決方案AIsynchronizedSessionthread
- 錯誤記錄(九)Could not obtain transaction-synchronized Session for current threadAIsynchronizedSessionthread
- Electron打包的時候路徑出現問題!include: could not find: "C:UsersxxxxAppDataLocalTemp -TH3KzBAPP
- Error querying database. XXXXXXXXXXXXX, No database selected。ErrorDatabase
- Error building Player: Win32Exception: ApplicationName=‘xxxxxxxxxxxxxxxxxx//sdk\tools\zipalign.exe' ...ErrorUIWin32ExceptionAPP
- Internal Error with background job scheduling XXXXXXXXXXXXX.Error
- expdp匯出時卡死 Could not increase the asynch I/O limit to XXX for SQL direct I/OMITSQL
- 禁止su命令
- mac 下vscode 更新時提示:Could not create temporary directory: 許可權被拒絕MacVSCode
- // @require file://C:xxxxxxxxx.jsUIJS
- 【轉】linux下命令su與su - 的區別。Linux
- Linux下su與su -命令的本質區別Linux
- mysql Incorrect key file for table ‘/xxxxxxxx/xxxx.MYI'; try to repair itMySqlAI
- su和sudo命令
- python su - oraclePythonOracle
- Linux命令su、sudo、sudo su、sudo -i使用和區別Linux