- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Error su: cannot set user id: Resource temporarily unavailable error while trying to su or to login as a local user. This error is also observed when logging in as a user on the console and using the SSH.
/etc/security/limits.confand all files in
/etc/security/limits.d/for the current setting of the
- Extend the
nprocvalue. This can be done in
/etc/security/limits.confor in any file in a file in
- Example of
<username> - nproc <limit number> e.g. testuser - nproc 10240
- In Red Hat Enterprise Linux 6, there's a default setting in
/etc/security/limits.d/90-nproc.conf. Change the default limit for all users or add a new limit for the affected user.
# Default limit for number of user's processes to prevent # accidental fork bombs. # See rhbz #432903 for reasoning. * soft nproc 1024 testuser soft nproc 10240 <== add
The user fails to log in because an
EAGAINerror occurs if the user's number of executing threads has reached the
Note: Despite the name, this is a limit on threads, not processes.
This error may occur if user's
nproclimit is set to
In Red Hat Enterprise Linux 6, this error occurs even if the limit is not explicitly set because the default configuration for all users is set in
/etc/security/limits.conffor the user.
- Log in as this user and run
$ ulimit -u 120831
- Look at
# cat /proc/sys/kernel/threads-max 241663
- Look at the number of user processes(threads)
# ps -u testuser -L | wc -l 103
- Look at
su: pam_keyinit(su-l:session): Unable to change UID to 24074 temporarily su: pam_keyinit(su-l:session): Unable to change UID to 24074 temporarily
- Look at
strace -ttTvfo /tmp/su.strace su - testuser:
23318 10:35:59.758440 setgid(24075) = 0 <0.000005> 23318 10:35:59.758471 setuid(24074) = -1 EAGAIN (Resource temporarily unavailable) <0.000018>
- Red Hat Enterprise Linux
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.