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 編輯
( U2 W4 y. `; f6 b+ {( a
, e  Z( z( b2 i/ V' p- ?. V徵狀:! R5 E6 W. F* ?3 I+ u

5 L7 l, L' E1 t, q某天因為需要從root su 到一般的user,指令如下:; K- X1 ~1 g/ @; z
#su someuser  結果show error- W0 e1 L4 g" }9 T1 R, ~
su: cannot set user id: Resource temporarily unavailable
& f/ Z$ ^" P* m# }# A) ^; s' _% J; D: G6 y) f% J
查了google得知根本原因是process 最大限制是 1024:
0 b0 O/ K5 h8 d8 S
) y# o- I, p. H# }#cat /etc/security/limits.d/90-nproc.conf
) v- i; l' X# q7 ^0 h# Default limit for number of user's processes to prevent
4 v4 k* ~6 X/ g. f$ n2 _# accidental fork bombs.: e+ ^7 M: R) b" ?6 O( N7 ?, v) ~
# See rhbz #432903 for reasoning.3 u9 H# o0 q1 h. A/ H8 K
2 X$ B, P5 b2 _0 U7 |2 O
*          soft    nproc     1024     ====>將1024改成大一點如4096就 OK
; a3 m, Z, Z  t" froot       soft    nproc     unlimited
+ [0 w% W! Z$ C# X# d. _
8 x8 o, u" B3 x. m3 N/ ?# \9 _
4 X: {6 U( ^9 ?7 m# [# ~5 V

7 N3 _$ O. v+ W% E9 ^$ o, ^  c5 y' w9 n3 B- e
% ^, h" W) }6 t6 J+ L





歡迎光臨 52AV手機A片王|52AV.ONE (https://www.52av.one/) Powered by Discuz! X3.2