Excuse me, when I change the ulimit, should I restart anything? Or changes are 
applied on the fly?

 
Regards,
Mahmood



On Thursday, October 24, 2013 2:30 AM, Mahmood Naderan <nt_mahm...@yahoo.com> 
wrote:
 
>Check "pgrep -u mahmood | wc -l" - if it reports number close to or above
>1000 (default limit 1024), then it's that.

# pgrep -u mahmood | wc -l
2118


!! That's it


I will change that. Meanwhile, what will happen to the those which are beyond 
the limit? Are they running?

 
Regards,
Mahmood



On Thursday, October 24, 2013 2:26 AM, Vladimir Mosgalin 
<mosga...@vm10124.spb.edu> wrote:
 
Hi Mahmood Naderan!


On 2013.10.23 at 15:15:16 -0700, Mahmood Naderan wrote next:

> As root, I can not su to my user
> 
> [root@tiger ~]# su - mahmood
> su: cannot set user id: Resource temporarily unavailable
> 
> 
> Which resource is unavailable right now? how can I find that?

Maybe too many processes for that user?
Check
 "pgrep -u mahmood | wc -l" - if it reports number close to or above
1000 (default limit 1024), then it's that.

You can check limits for current user with "ulimit -a" and tweak them in
/etc/security/limits.conf and /etc/security/limits.d/* (1024 processes
per user is set in /etc/security/limits.d/90-nproc.conf)

There are also other limits you can exceed, like limits on open files,
or it can be limitation of selinux policies and few other causes -
but error in setuid() is likely process limit.

If it's something else, you should run "su" under strace ("strace -f"
would be useful) and examine its output. You can solve (nearly) all
mysteries like this with strace.

-- 

Vladimir

Reply via email to