Friday, 10 January 2014

su: cannot set user id: Resource temporarily unavailable - Linux

   Restricting direct root login and using Wheel user always make better security, but some cases we may face below error,

"su: cannot set user id: Resource temporarily unavailable" 

To overcome this issue, we need to add / increase the number of processes value in /etc/security/limits.conf.

A quick check about the number of operating system processes.

# ps -U wheel-user | wc -l

To add / increase the below value in /etc/security/limits.conf

# wheel-user soft nproc(maximum number of processes) value
admin soft nproc 2048

If this won't work,

vi /etc/security/limit.conf
# add / change on these line:
*          soft   nproc       2047
*         hard   nproc       16384
*         soft   nofile       2048
*         hard   nofile      65536


Now you can try to login once again.. it will works.