CentOS6/Linuxsu: unable to set user ID: Resource temporarily unavailable

Source: Internet
Author: User

CentOS6/Linuxsu: unable to set user ID: Resource temporarily unavailable
System Environment: CentOS 6.5

When switching user doiido using su today, the following error occurs:
# Su-doiido
Su: unable to set user ID: Resource temporarily unavailable

At the same time, remote SSH tools such as SecureCRT cannot be connected using the doiido user.
Find the relevant information and find that/etc/security/limits exists in CentOS 6. d/90-nproc.config file, which limits the maximum number of threads for normal permission users. When the maximum number of threads for this user reaches the maximum number of user processes, the user cannot connect to log on. Therefore, this parameter can only be modified when the thread cannot be reduced. The specific modification method is as follows:

1. View max user processes

# Su-doiido

Su: unable to set user ID: Resource temporarily unavailable

# Ulimit-u
1024

We 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

As shown above, all users except for the root user are limited to 1024. Therefore, this problem can be solved by commenting on this line or changing the value to a greater value.
Save and exit after modification is complete. Such modification takes effect immediately (tested)
3. You can also modify the/etc/security/limits. conf file. The Modification result is as follows:
# Cat/etc/security/limits. conf
Doiido soft nproc 2047
Doiido hard nproc 16384
Doiido soft nofile 1024
Doiido hard nofile 65535

Note: This file is not available in CentOS 5.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.