解決“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寶典今日頭條號地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● 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 ● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店: https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麥苗出版的資料庫類叢書: 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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 詳解Nginx 13: Permission denied 解決方案Nginx
- PermissionError: [Errno 13] Permission denied解決辦法Error
- 寶塔解決 mkdir() Permission Denied 的問題
- 解決centos 刪除資料夾 permission deniedCentOS
- git出現Permission denied的解決辦法Git
- mac vscode 更新失敗:Permission denied解決辦法MacVSCode
- Python報錯:PermissionError: [Errno 13] Permission denied解決方案PythonError
- frepplectl解決報錯:bash: /usr/bin/frepplectl: Permission denied
- PermissionError: [Errno 13] Permission denied 如何解決Error
- 解決方案 git@github.com出現Permission denied (publickey)Github
- openSSH升級公鑰失效Permission denied (publickey)解決方案
- Linux的wheel組:LINUX下使用者使用su命令切換使用者報錯su: Permission deniedLinux
- PermissionError: [Errno 13] Permission denied:的許可權該怎麼解決。。。Error
- 【Android】Permission denied (missing INTERNET permission?)異常踩坑Android
- Angular macOS Err:EACCES: permission deniedAngularMac
- Nginx: stat() failed (13: permission denied)NginxAI
- libcudart.so.8.0: cannot open shared object file解決方案DartObject
- 成功解決PermissionError: [Errno 13] Permission denied: './data\\mnist\\train-images-idx3-ubyte'ErrorAI
- PermissionError: [Errno 13] Permission denied: 'C:\\Users\\jason\\Documents\\t2'的解決方案Error
- su - xxx Could not create sessionSession
- Android Studio: /dev/kvm device permission deniedAndroiddev
- nginx部署(13:Permission denied)報錯Nginx
- Error: Permission denied @ apply2filesErrorAPP
- PHP中 mkdir: Permission denied 問題PHP
- IOError: [Errno 13] Permission denied 解決:linux下python安裝並使用非root模組ErrorLinuxPython
- Permission denied Command PhaseScriptExecution failed with a nonzero exit codeAI
- Permission denied:user=xxx,access=WRITE,inode=xxx
- Android10 建立檔案 Permission deniedAndroid
- Ubuntu git pull 出現Permission denied ErrorUbuntuGitError
- git push出現Permission denied (publickey)錯誤Git
- unix /var/run/docker.sock: connect: permission deniedDocker
- Docker + maven build problem — unix://localhost:80: Permission deniedDockerMavenUIlocalhost
- listen EACCES: permission denied 0.0.0.0:9520 at Server.setupListenHandleServer
- Android adb除錯出現:opendir failed, Permission deniedAndroid除錯AI
- 【踩坑筆記】專案出現Permission denied筆記
- Python 執行報錯 PermissionError: [Errno 13] Permission denied: '***.***'PythonError
- Nginx報錯:Permission denied,沒有許可權!Nginx
- Docker容器掛載資料卷出現Permission denied許可權問題的解決辦法Docker