52AV手機A片王|52AV.ONE
標題:
su 指令出現的問題: su: cannot set user id: Resource temporarily unavailable
[打印本頁]
作者:
IT_man
時間:
2017-3-28 10:09
標題:
su 指令出現的問題: su: cannot set user id: Resource temporarily unavailable
本帖最後由 IT_man 於 2017-3-28 10:13 編輯
3 W; _# K; H9 E6 {' p
9 m y O& F7 |. l. b7 O5 f" F6 ?( t
徵狀:
* k4 W. E: S R5 q( ~
6 d* `: F6 z$ ~1 h6 Y& \
某天因為需要從root su 到一般的user,指令如下:
6 L# O: z/ T& ~0 [
#su someuser 結果show error
. Z o! h( T" H- B% |& M
su: cannot set user id: Resource temporarily unavailable
4 s: a# }* G7 s% R$ M9 D
: N0 d7 r/ o( o- \* l
查了google得知根本原因是process 最大限制是 1024:
3 t. K/ R _2 g( B+ J8 d
/ \$ P: x2 x) `2 ?* D
#cat /etc/security/limits.d/90-nproc.conf
: [- `0 s+ g4 T8 N4 o- C6 _
# Default limit for number of user's processes to prevent
. M, |: t$ Q+ R0 i) j
# accidental fork bombs.
, u) x3 I8 K6 Q7 R- q7 G7 C
# See rhbz #432903 for reasoning.
( d! ^. m# L4 [+ \( G u
9 |8 ?3 u: _0 V- X: G9 C. l3 I) d
* soft nproc 1024 ====>將1024改成大一點如4096就 OK
" U. ^1 R( [/ w$ Y
root soft nproc unlimited
0 \( @: K; \9 J2 ?$ r6 R: M. }
B( G+ z0 J( y9 P. S" c
$ d) {/ V# V- H# U {3 n% E, @
# T }2 X | {/ Z5 U& ]
: P# o k" w6 D7 [. X$ M0 o
2 |9 K/ I8 M7 K& h* u4 [. N7 F2 ~
歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/)
Powered by Discuz! X3.2