Cannot set user id: Resource temporarily unavailable while trying to login or su as a local user in CentOS

If you encounter this error while trying to login or su –login

# su --login user1
"cannot set user id: Resource temporarily unavailable" while trying to login or su as a local user in CentOS.

To resolve the issue,  extend the nproc value in /etc/security/limits.conf for the user.

.....
.....
user1       soft    nproc   10240
# End of file

Alternatively, you can edit /etc/security/limits.d/90-nproc.conf which is

# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

*          soft    nproc     1024
user1       soft    nproc    10240

In CentOS 6, this error occurs even if it has not set the limit explicitly because default configuration to all users is set to /etc/security/limits.d/90-nproc.conf. the reason for this error is that the the user’s the number of executing threads has reached the nproc resource limit.

Compiling and Configuring Python 3.4.1 on CentOS

Step 1: Remember to turn on RPMForge and EPEL Repository.

For more information on repository, see Repository of CentOS 6 and Scientific Linux 6 

Step 2: Download Python-3.4.1 from the Python Download Page

Step 3: Install Prerequisite Software

# yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

 Step 4: Configure and Build

# cd /installation_home/Python-3.4.1
# ./configure --prefix=/usr/local/python-3.4.1
# make
# make install

Step 5: Check that scripts query the correct interpreter:

#/usr/local/python-3.4.1/bin/python3

Step 6: Run setup.py from the Installation Directory of Python

# python setup.py install

Step 7: Install Python Modules (whatever you need. Here is an example)
You can use pip install to install packages using pip3. See Using pip to install python packages

# /usr/local/python-3.4.1/bin/pip3 install networkx