Hi All,
This thread was helpful to me to a large extent. So I want this thread to be more clear for all who have the same issue and i think this thread will give answer to the previous query .
As Chirpy mentioned we have to make changes on the three files but the changes are same.
the files to be changed are
/etc/profile
/etc/bashrc
/etc/profile.d/limits.sh
As Brett told there will be some what similar lines as given in the quote but the values may have difference.
======================================================================================
if [ "$LIMITUSER" != "root" ]; then
ulimit -n 100 -u 10 -m 100000 -d 100000 -s 8192 -c 100000 -v 100000 2>/dev/null
else
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
fi
======================================================================================
The mentioned lines gives unlimited access to the root user but generally there will not be direct ssh acces through root while thinking about security purposes. Here all other users have only limited access. To give unlimited access to a user say 'USER1' chnge this line to
======================================================================================
if [ "$LIMITUSER" = "root" ]; then
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
elif [ "$LIMITUSER" = "USER1" ]; then
ulimit -n 4096 -u 14335 -m unlimited -d unlimited -s 8192 -c 1000000 -v unlimited 2>/dev/null
else
ulimit -n 100 -u 20 -m 200000 -d 200000 -s 8192 -c 200000 -v 200000 2>/dev/null
fi
=======================================================================================
This is a very simple change while we think with the logic of if loop. You have to make changes in all the three files mentioned like this. All other users except root and USER1 will have only limited access.
If anyone find anything wrong in this post please point it as I am new to this field.
Really Thanks for Chirpy and Brett as they were the persons who showed me the path to move forward in this case.
Thanks for your time.
---
Regards,
Abhilash V Nair