This Blog is to share our knowledge and expertise on Linux System Administration and VMware Administration

Monday, October 2, 2017

How to solve the Resource temporarily unavailable issue in RHEL6?

Situation:

While switching from one user to other user, getting below error. Still we have entry in limits.conf  (special case)

[root@testserver ~]#  su - testuser

su: cannot set user id: Resource temporarily unavailable

Solution:

[root@testserver ~]# cd /etc/security/limits.d/

[root@testserver limits.d]# ls -l
total 4
-rw-r--r-- 1 root root 191 Mar 23  2017 90-nproc.conf


[root@testserver limits.d]# cat 90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*            soft    nproc     1024
root       soft    nproc     unlimited

Take the backup & add the below entry

testuser    soft    nproc     327679

[root@testserver limits.d]# cp -p 90-nproc.conf 90-nproc.conf.org

[root@testserver limits.d]# cat 90-nproc.conf
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*               soft    nproc     1024
root          soft    nproc     unlimited
testuser    soft    nproc     327679

Now able to switch

root@testserver limits.d]# su - testuser

Current version is 034.008.001.001 with 10.3.6.0.170718-JDK1.7U111


-bash-4.1$

Hope it helps

No comments:

Post a Comment