Error: "cannot open a session" when switching to a user without root inside the docker container from the root user using the su command

I cannot switch to a user without a root user inside the docker container from the root user using the su command.

Here is what i did

  • I created a docker container on centos: 6

  • created by the user "about" inside the container

  • updated /etc/security/limits.conf file with the data below in the container

    circa hard nofile 5000

    circa soft nofile 5000

  • But when I switch to the user "about" with the command "su-circa", I get an error

    "could not open session"

If I reduce the nofile counter to "4000", I can log in as a user using the "su-circa" command and run my server program.

What do I need to do to make it work for higher file numbers?

Some information about my environment:

Docker Host Information

#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 Information

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

Source: https://habr.com/ru/post/1232407/


All Articles