Cannot set user id: Resource temporarily unavailable while trying to login or su as a local user in CentOS


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.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s