解決“su: cannot open session: Permission denied”
在容器docker中切換使用者時報錯:
[root@oracle19c /]# su - oracle
su: cannot open session: Permission denied
解決:
[root@oracle19c /]# vi /etc/pam.d/su [root@oracle19c /]# cat /etc/pam.d/su #%PAM-1.0 auth sufficient pam_rootok.so # Uncomment the following line to implicitly trust users in the "wheel" group. #auth sufficient pam_wheel.so trust use_uid # Uncomment the following line to require a user to be in the "wheel" group. #auth required pam_wheel.so use_uid auth substack system-auth auth include postlogin account sufficient pam_succeed_if.so uid = 0 use_uid quiet account include system-auth password include system-auth # session include system-auth session include postlogin session optional pam_xauth.so [root@oracle19c /]# su - oracle Last login: Wed Apr 1 14:04:58 CST 2020 on pts/1
方法:註釋檔案/etc/pam.d/su中的“session include system-auth”一行即可。
About Me
........................................................................................................................ ● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除 ● 本文在itpub、部落格園、CSDN和個人微 信公眾號( DB寶)上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文部落格園地址: http://www.cnblogs.com/lhrbest ● 本文CSDN地址: https://blog.csdn.net/lihuarongaini ● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA寶典今日頭條號地址: ........................................................................................................................ ● QQ群號: 230161599 、618766405 ● 微 信群:可加我微 信,我拉大家進群,非誠勿擾 ● 聯絡我請加QQ好友 ( 646634621 ),註明新增緣由 ● 於 2020-03-01 06:00 ~ 2020-03-31 24:00 在西安完成 ● 最新修改時間:2020-03-01 06:00 ~ 2020-03-31 24:00 ● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店: ● 小麥苗出版的資料庫類叢書: http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麥苗OCP、OCM、高可用網路班: http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麥苗騰訊課堂主頁: https://lhr.ke.qq.com/ ........................................................................................................................ 使用 微 信客戶端掃描下面的二維碼來關注小麥苗的微 信公眾號( DB寶)及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。
........................................................................................................................ |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2683813/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Permission Denied(publickey) 解決
- su - root could not open sessionSession
- Cannot restore segment prot after reloc:Permission deniedREST
- 詳解Nginx 13: Permission denied 解決方案Nginx
- PermissionError: [Errno 13] Permission denied解決辦法Error
- su的時候報:could not open sessionSession
- 解決centos 刪除資料夾 permission deniedCentOS
- git出現Permission denied的解決辦法Git
- 寶塔解決 mkdir() Permission Denied 的問題
- PermissionError: [Errno 13] Permission denied 如何解決Error
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- 切換使用者時提示:cannot change directory to /home/oracle: Permission deniedOracle
- su cannot set user id Resource temporarily unavailable故障解決AI
- mac vscode 更新失敗:Permission denied解決辦法MacVSCode
- 解決方案 git@github.com出現Permission denied (publickey)Github
- openSSH升級公鑰失效Permission denied (publickey)解決方案
- Linux的wheel組:LINUX下使用者使用su命令切換使用者報錯su: Permission deniedLinux
- PermissionError: [Errno 13] Permission denied:的許可權該怎麼解決。。。Error
- Hexo deploy git permission deniedHexoGit
- sqlplus因selinux報錯cannot restore segment prot after reloc: Permission deniedSQLLinuxREST
- libclntsh.so.11.1:cannot restore segment prot after reloc:Permission denied 報錯REST
- Angular macOS Err:EACCES: permission deniedAngularMac
- -bash: ./backup.sql: Permission deniedSQL
- Nginx: stat() failed (13: permission denied)NginxAI
- XIII Open Grodno SU Championship
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jason\\Documents\\t2'的解決方案Error
- Linux su 切換到某使用者時報錯: could not open sessionLinuxSession
- PHP中 mkdir: Permission denied 問題PHP
- adb remount of system failed: Permission deniedREMAI
- nginx部署(13:Permission denied)報錯Nginx
- 解決org.hibernate.exception.GenericJDBCException: Cannot open connectionExceptionJDBC
- hibernate open session in view 丟擲異常解決方法SessionView
- 使用wireshark出現Couldn't run /usr/bin/dumpcap in child process: Permission denied解決辦法PCA
- libcudart.so.8.0: cannot open shared object file解決方案DartObject
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Error: Permission denied @ apply2filesErrorAPP
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- Warning: Cannot send session cookie - headers already sent 解決SessionCookieHeader