SCIENTIFIC-LINUX-USERS Archives

October 2013

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Vladimir Mosgalin <[log in to unmask]>
Reply To:
Vladimir Mosgalin <[log in to unmask]>
Date:
Thu, 24 Oct 2013 02:55:49 +0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (32 lines)
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

ATOM RSS1 RSS2