system Environment: CentOS 6.5
Today, when using the SU Switch User Doiido, the following error occurred:
# Su-doiido
SU: Unable to set User id: resource is temporarily unavailable
Doiido user connections are not available with remote SSH tools such as SECURECRT.
Find the relevant information, found in CentOS 6, there is a/etc/security/limits.d/90-nproc.config file, this file limits the maximum number of threads for a user of normal permissions, when the maximum number of threads for this user max user Processes reach the maximum limit, you cannot connect to the login. Therefore, you can modify this parameter only if you cannot reduce the thread, as follows:
1. View MAX User processes
# Su-doiido
SU: Unable to set User id: resource is temporarily unavailable
# Ulimit-u
1024
You can see that the maximum number of threads is 1024
2. Modify MAX User processes
# vi/etc/security/limits.d/90-nproc.conf
* Soft Nproc 1024
Root Soft Nproc Unlimited
It can be seen that all users except the root user are limited to 1024, so the problem can be resolved by annotating this line or by changing the value to
After the modification is complete, save and exit, such modification is effective immediately (tested successfully)
3, you can also modify the/etc/security/limits.conf file, the results are as follows
# cat/etc/security/limits.conf
Doiido Soft Nproc 2047
Doiido Hard Nproc 16384
Doiido Soft Nofile 1024
Doiido Hard Nofile 65535
Note: There is no such file in CentOS 5
CentOS 6/linux SU: Unable to set User id: resource is temporarily unavailable