If you encounter this error while trying to login or su –login
# su --login user1 "cannot set user id: Resource temporarily unavailable" while trying to login or su as a local user in CentOS.
To resolve the issue, extend the nproc value in /etc/security/limits.conf for the user.
..... ..... user1 soft nproc 10240 # End of file
Alternatively, you can edit /etc/security/limits.d/90-nproc.conf which is
# Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 1024 user1 soft nproc 10240
In CentOS 6, this error occurs even if it has not set the limit explicitly because default configuration to all users is set to /etc/security/limits.d/90-nproc.conf. the reason for this error is that the the user’s the number of executing threads has reached the nproc resource limit.