52AV璈A|52AV.ONE

 曉撖蝣
 蝡唾酉
敹急瑕
  • av隢憯BBS
  • 璈A
  • 芣瑟憭瘚
  • 鞎澆
  • 52av鋆貉摰
  • 銝剜-銝剖銝餅
Yahoo!憟拇撠
望: 璈A
Google憟拇撠
望: 璈A
     
亦: 3528|敺: 0
銝銝銝駁 銝銝銝駁

[linux隞也 Linux 銝 su v.s sudo 隞斗頛

[銴鋆賡包
頝唾唳摰璅撅
璅銝
潸” 2014-12-21 14:08:00 | 芰閰脖 撣 |摨閬 |梯璅∪
砍敺 media 2014-12-21 14:12 蝺刻摩 4 y  Q+ `1 Y+ l1 \" S1 ]

3 W  G% h& V2 C$ t. P& G$ J) esu=switch user ,頧郢oot 撣唾
8 M# J8 M2 _8 V: h9 Z" ~2 ^. c" Psudo 臭誑root甈瑁賊賭誘,靘憒: sudo service mysqld restart,抵隤芣憒銝:! j/ l# x: ?; |! ~' T9 M" o
6 f+ ?+ S, C( O4 d( w6 b7 z* N
Linux摰鋆憟隞嗉蝟餌絞閮剖賡閬root甈嚗撠望盎uper-user privileges (擃甈)嚗銋撠望舐恣⊥憒雿root甈嚗臭誑湔亦究sh餃叵oot撣唾嚗究u(substitute user)隞支雿輻刻嚗銝嗅停臭蝙究udo隞扎
& X+ q- U0 R! F, o
/ L" W$ h% e/ ~/ ~2 I6 d# S1. 雿輻究u隞
  1. #究u雿輻刻
    , J/ f0 N" V# q( }0 E. j
  2. [aaron@phoenix ~]$ su#雿輻究u氳oot
    ! w3 I9 }$ y& R: c" L1 E) J
  3. Password:[頛詨叵oot撖蝣奭3 O& \2 t/ W# t0 A9 w, N+ d
  4. % ^+ K8 l" u( C5 }* B
  5. [root@phoenix aaron]# service httpd restart#撌脣氳oot- }! c) }5 v$ J' @2 g
  6. Stopping httpd:                                            [  OK  ]
    + ~0 Z+ D$ j' L2 q% g2 g5 M4 }7 E
  7. Starting httpd:                                            [  OK  ]5 V5 [: V  X$ m: k3 Z! n0 |

  8.   ?4 U# X( T, G& |3 K
  9. [root@phoenix aaron]# exit#aaron3 X. g4 ~' I# Q- O. K
  10. 1 S2 i7 I* p2 f1 R* y
  11. #瑁桐隞歹銝閬氳oot
    , C4 ]  |. q1 Z* K6 S; D
  12. [aaron@phoenix ~]$ su -c "service httpd restart"
    , }# _- `; i; u$ ^1 h
  13. Password:[頛詨叵oot撖蝣奭1 }8 m8 o- w) v+ I" X0 `1 G' v' K3 v
  14. Stopping httpd:                                            [  OK  ]9 O# t; Y5 v4 n0 W% L3 m
  15. Starting httpd:                                            [  OK  ]
    . v6 P! h, [+ e/ P- N& s& Q
  16. 3 g; @# z8 X- H. Q
  17. #瑁susu -撌桀(Shell啣臬西)) K, ^4 X1 N: T( e9 {6 f
  18. [aaron@phoenix ~]$ su1 _) i) Q! e% }
  19. Password:[頛詨叵oot撖蝣奭% p; ?0 i9 }6 ?: s9 i& X
  20. [root@phoenix aaron]# echo $PATH#訐ATH霈賂潛暸雿輻災aronPATH霈
    / G6 ~8 A7 ?6 p) Q, X
  21. /usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/aaron/bin
    , X6 f+ L! C7 L$ y0 I5 }0 A4 O

  22. ! n8 X; |; c1 T, o4 a% m. m1 K
  23. [aaron@phoenix ~]$ su -. m; u. z( T4 Z
  24. Password:[頛詨叵oot撖蝣奭
    0 p% H3 J. B2 g; s. h9 d8 ~
  25. [root@phoenix aaron]# echo $PATH#訐ATH霈賂雿輻禿ootPATH霈2 Q2 ~/ _7 f! `( Y# A# K9 {
  26. /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
銴鋆賭誨蝣

2 ]. Y% H( }: M( _% ~2. 閮剖sudoer

8 U8 S2 q3 m. s' r6 P6 K
  1. [aaron@phoenix ~]$ su' _7 c/ d7 P+ i5 ~2 Q+ N( a9 M2 S
  2. Password:[頛詨叵oot撖蝣奭  C- n0 N! j: v( ?

  3.   w+ y, }  Y; g0 t! p0 g
  4. [root@phoenix aaron]# vim /etc/sudoers9 A- J1 M  d( j/ ?6 W: u

  5. 0 c1 [5 b) {  i5 F4 B2 `0 ~4 H4 C
  6. ## Allow root to run any commands anywhere* a  Z, }1 n7 A7 W$ g% ~8 B, E
  7. root    ALL=(ALL)       ALL
    # T! C+ S5 a0 Q- S! q
  8. . n) j: e4 |4 ^8 R; x- q2 H
  9. ## Allow users to run any commands anywhere' L$ B# }/ I- J8 |3 X" Y/ O+ I
  10. aaron   ALL=(ALL)       ALL#啣璇閮帶aron臭誑瑁蝞∠⊥
銴鋆賭誨蝣
( J3 b2 g7 X# d$ m2 k
3. 蝭靘
  1. #瘝擃甈嚗隞亙停鋡急鈭
    8 G' B" \/ u' H" A+ Z
  2. [aaron@phoenix ~]$ service httpd restart
    4 @2 ]0 w% v- f% y4 D6 X- V$ I
  3. Stopping httpd:- w6 j- I) ^; ]2 x, y
  4. rm: cannot remove `/var/run/httpd/httpd.pid': Permission denied
    8 C" q5 e2 g% v- [- O8 b8 U
  5. . ~! h0 A1 m% F; F( b; B- [% z
  6. Starting httpd:9 ~: O3 @5 Z' A
  7. touch: cannot touch `/var/lock/subsys/httpd': Permission denied* Q! f3 \7 s$ J5 o
  8. * j8 q: Z# |9 K) N* x3 v% U" \4 ]
  9. #究udo撠勗臭誑4 i1 s6 Q5 ]0 @- l$ `6 }* u
  10. [aaron@phoenix ~]$ sudo service httpd restart$ l3 V/ o1 K( H1 ?
  11. [sudo] password for aaron:[頛詨亙蝣奭
    ( \- p; x8 b: w* P; {% `9 E
  12. Stopping httpd:                                            [  OK  ]& Q) h! t& d. y
  13. Starting httpd:                                            [  OK  ]
銴鋆賭誨蝣
#susudo撌桀亙冽潭臬西霈銝砌蝙刻仿root撖蝣潘憒究u撠勗撠root撖蝣澆鈭怠箏鳴敺航賡蝟餌絞鋡思噩亦梢芥sudo航銝砌蝙刻蝞∠⊥嚗芾頛詨亥芸楛撖蝣澆喳荔雿璅憸券迎箸蝞∠⊥" @$ S" o9 K2 f( f7 h5 E5 u  k
http://kezeodsnx.pixnet.net/blog/post/25810396

雿輻券

祉蝛閬

BT蝳

砍憛批捆靘餉衣雯頝臬批捆蝝颲行粹嗥蝬脩嚗摰撟湔遛嚗嚗甇脖誑銝嗅啣摰嗆摰撟湧翩鈭箏ㄚ孵舫脣伐銝憿亙祉璇甈橘芣遛18甇 雓蝯脣亦閬賬粹脩芣遛18甇脖芣撟渡雯閬賜雯頝臭嗥批捆鞈閮嚗撱箄降典舫脰蝬脰楝批捆蝝蝯蝜ICRA蝝摰鋆閮剖 (粹蝯行霅 祉蝬脣銝蝝瘛函隢憯啣嚗祉閮剜蝞∠)

QQ|撠暺撅||52AV璈A

GMT+8, 2024-12-22 17:05 , Processed in 0.057107 second(s), 16 queries .

蝯∠.撱

52avtv@gmail.com | QQ:2405733034     since 2015-01

鋆貉憒 敹恍敺 餈銵