错误:"无法打开会话"使用su命令从root用户切换到docker容器内的非root用户时

时间:2015-09-27 16:32:05

标签: linux docker

我无法使用su命令从root用户切换到docker容器内的非root用户。

以下是我做的事情

  1. 我在centos上创建了一个docker容器:6

  2. 创建了一个用户"大约"内容器

  3. 更新了/etc/security/limits.conf文件,其中包含容器中的以下数据

    大约硬nofile 5000

    大约软nofile 5000

  4. 但当我切换到用户"大约"使用命令" su - 大约",我收到错误

    "无法打开会话"

  5. 如果我将nofile数量减少到" 4000",我可以使用命令" su - circa"以大约用户身份登录并运行我的服务器程序。

    我需要做什么才能使其适用于更高的nofile计数?

    有关我的环境的一些细节:

    Docker主机信息

    #kernel version
    # uname -r
    3.10.81-1.el6.elrepo.x86_64
    
    #os release
    # cat /etc/redhat-release
    CentOS release 6.5 (Final)
    

    Docker Container信息

    #os release
    # cat /etc/redhat-release
    CentOS release 6.6 (Final)
    
    #kernel version
    # uname -r
    3.10.81-1.el6.elrepo.x86_64
    

0 个答案:

没有答案