Monday, 15 November 2010

ulimit errors cannot modify limit

after changing the default ulimit values in /etc/profile by adding

ulimit -n 20000
ulimit -i 20000
ulimit -l 10000

if we try to login using another different normal user using ssh we get the following errors:

-bash: ulimit: open files: cannot modify limit: Operation not permitted
-bash: ulimit: pending signals: cannot modify limit: Operation not permitted
-bash: ulimit: max locked memory: cannot modify limit: Operation not permitted

In this case if we just restart the ssh service using:

/etc/init.d/sshd restart

then try to login again the error will be solved.