OpenVZ is a container based virtualization technique for Linux. OpenVZ creates multiple secure, isolated Linux containers (otherwise known as VEs or VPSs) on a single physical server. Each container performs and executes exactly like a stand-alone server; a container can be rebooted independently and have root access, users, IP addresses, memory, processes, files, applications, system libraries and configuration files.
Here I explain a fix for the error “Resource temporarily unavailable” while switching user in OpenVZ based servers.
# su - Password: su: cannot set user id: Resource temporarily unavailable
Edit (add) or change the following values in /etc/security/limits.conf
# vi /etc/security/limits.conf ------------- * soft nproc 2047 * hard nproc 16384 * soft nofile 1024 * hard nofile 65536 -------------
It should be okay now!
Please try to switch now and let me know if you have any questions.