Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

LinuxϵͳSudoÃüÁîµÄʹÓÃ˵Ã÷

“Sudo” ÊÇUnix/Linuxƽ̨ÉϵÄÒ»¸ö·Ç³£ÓÐÓõŤ¾ß£¬ËüÔÊÐíϵͳ¹ÜÀíÔ±·ÖÅä¸øÆÕͨÓû§Ò»Ð©ºÏÀíµÄ“ȨÀû”£¬ÈÃËûÃÇÖ´ÐÐһЩֻÓг¬¼¶Óû§»òÆäËûÌØÐíÓû§²ÅÄÜÍê³ÉµÄÈÎÎñ£¬±ÈÈ磺ÔËÐÐһЩÏñmount£¬halt£¬suÖ®ÀàµÄÃüÁ»òÕ߱༭һЩϵͳÅäÖÃÎļþ£¬Ïñ/etc/mtab£¬ /etc/samba/smb.confµÈ¡£ÕâÑùÒÔÀ´£¬¾Í²»½ö¼õÉÙÁËrootÓû§µÄµÇ½´ÎÊýºÍ¹ÜÀíʱ¼ä£¬Ò²Ìá¸ßÁËϵͳ°²È«ÐÔ¡£
¡¡¡¡Ò». sudoµÄÌصã
¡¡¡¡sudo°çÑݵĽÇɫע¶¨ÁËËüÒªÔÚ°²È«·½Ãæ¸ñÍâ½÷É÷£¬·ñÔò¾Í»áµ¼Ö·Ƿ¨Óû§¾ðÈ¡rootȨÏÞ¡£Í¬Ê±£¬Ëü»¹Òª¼æ¹ËÒ×ÓÃÐÔ£¬ÈÃϵͳ¹ÜÀíÔ±Äܹ»¸üÓÐЧ£¬¸ü·½±ãµØʹÓÃËü¡£sudoÉè¼ÆÕßµÄ×ÚÖ¼ÊÇ£º¸øÓû§¾¡¿ÉÄÜÉÙµÄȨÏÞµ«ÈÔÔÊÐíÍê³ÉËûÃǵŤ×÷¡£ËùÒÔ£¬sudo
ÓÐÒÔÏÂÌص㣺
¡¡¡¡# 1. sudoÄܹ»ÏÞÖÆÖ¸¶¨Óû§ÔÚÖ¸¶¨Ö÷»úÉÏÔËÐÐijЩÃüÁî¡£
¡¡¡¡# 2. sudo¿ÉÒÔÌṩÈÕÖ¾£¬ÖÒʵµØ¼Ç¼ÿ¸öÓû§Ê¹ÓÃsudo×öÁËЩʲô£¬²¢ÇÒÄܽ«ÈÕÖ¾´«µ½ÖÐÐÄÖ÷»ú»òÕßÈÕÖ¾·þÎñÆ÷¡£
¡¡¡¡# 3. sudoΪϵͳ¹ÜÀíÔ±ÌṩÅäÖÃÎļþ£¬ÔÊÐíϵͳ¹ÜÀíÔ±¼¯ÖеعÜÀíÓû§µÄʹÓÃȨÏÞºÍʹÓõÄÖ÷»ú¡£ËüĬÈϵĴæ·ÅλÖÃÊÇ/etc/sudoers¡£
¡¡¡¡# 4.sudoʹÓÃʱ¼ä´ÁÎļþÀ´Íê³ÉÀàËÆ“¼ìƱ”µÄϵͳ¡£µ±Óû§Ö´ÐÐsudo²¢ÇÒÊäÈëÃÜÂëºó£¬Óû§»ñµÃÁËÒ»ÕÅĬÈÏ´æ»îÆÚΪ5·ÖÖӵēÈ볡ȯ”£¨Ä¬ÈÏÖµ¿ÉÒÔÔÚ±àÒëµÄʱºò¸Ä±ä£©¡£³¬Ê±ÒÔºó£¬Óû§±ØÐëÖØÐÂÊäÈëÃÜÂë¡£
¡¡¡¡¶þ. sudoÃüÁî
¡¡¡¡sudo³ÌÐò±¾Éí¾ÍÊÇÒ»¸öÉèÖÃÁËSUIDλµÄ¶þ½øÖÆÎļþ¡£ÎÒÃÇ¿ÉÒÔ¼ì²éÒ»ÏÂËüµÄȨÏÞ£º
¡¡¡¡$ls -l /usr/bin/sudo
¡¡¡¡---s--x--x 2 root root 106832 02-12 17:41 /usr/bin/sudo
¡¡¡¡ËüµÄËùÓÐÕßÊÇroot£¬ËùÒÔÿ¸öÓû§¶¼¿ÉÒÔÏñrootÄÇÑùÖ´ÐиóÌÐò¡£ÉèÖÃÁËSUIDµÄ³ÌÐòÔÚÔËÐÐʱ¿ÉÒÔ¸øʹÓÃÕßÒÔËùÓÐÕßµÄEUID¡£ÕâÒ²ÊÇΪʲôÉèÖÃÁËSUIDµÄ³ÌÐò±ØÐëСÐıàд¡£µ«ÊÇÉèÖÃÒ»¸öÃüÁîÎļþµÄSUID ºÍÓÃsudoÀ´ÔËÐÐËüÊDz»Í¬µÄ¸ÅÄËüÃÇÆð×Ų»Í¬µÄ×÷Óá£
¡¡¡¡sudoµÄÅäÖö¼¼Ç¼ÔÚ/etc/sudoersÎļþÖУ¬ÎÒÃÇÏÂÃ潫»áÏêϸ˵Ã÷¡£ÅäÖÃÎļþÖ¸Ã÷ÄÄЩÓû§¿ÉÒÔÖ´ÐÐÄÄЩÃüÁҪʹÓÃsudo£¬Óû§±ØÐëÌṩһ¸öÖ¸¶¨Óû§ÃûºÍÃÜÂë¡£×¢Ò⣺sudoÐèÒªµÄ²»ÊÇÄ¿±êÓû§µÄÃÜÂ룬¶øÊÇÖ´ÐÐsudoµÄÓû§µÄÃÜÂë¡£Èç¹û²»ÔÚsudoersÖеÄÓû§Í¨¹ýsudoÖ´ÐÐÃüÁsudo»áÏò¹ÜÀíÔ±±¨¸æÕâһʼþ¡£Óû§¿ÉÒÔͨ¹ýsudo -vÀ´²é¿´×Ô¼ºÊÇ·ñÊÇÔÚsudoers Ö®ÖС£Èç¹ûÊÇ£¬Ëü»¹¿


Ïà¹ØÎĵµ£º

Linux iptableÎĵµ

×ÜÀÀ
ÓÃiptables -ADC À´Ö¸¶¨Á´µÄ¹æ
Ôò
£¬-AÌí¼Ó -Dɾ³ý -C ÐÞ¸Ä
iptables - [RI] chain rule num rule-specification[option]
ÓÃiptables - RI ͨ¹ý¹æÔòµÄ˳ÐòÖ¸¶¨
iptables -D chain rule num[option]
ɾ³ýÖ¸¶¨¹æÔò
iptables -[LFZ] [chain][option]
ÓÃiptables -LFZ Á´Ãû [Ñ¡Ïî]
iptables -[NX] chain
ÓÃ -NX ......

Linux µÄ¶àÏ̱߳à³ÌµÄ¸ßЧ¿ª·¢¾­Ñé

2009 Äê 4 ÔÂ 23 ÈÕ
±¾ÎÄÖÐÎÒÃÇÕë¶Ô Linux É϶àÏ̱߳à³ÌµÄÖ÷ÒªÌØÐÔ×ܽá³ö 5 Ìõ¾­Ñ飬ÓÃÒÔ¸ÄÉÆ Linux ¶àÏ̱߳à³ÌµÄÏ°¹ßºÍ±ÜÃâÆäÖеĿª·¢ÏÝÚå¡£ÔÚ±¾ÎÄÖУ¬ÎÒÃÇ´©²åһЩ Windows µÄ±à³ÌÓÃÀýÓÃÒÔ¶Ô±È Linux ÌØÐÔ£¬ÒÔ¼ÓÉî¶ÁÕßÓ¡Ïó¡£
±³¾°
Linux ƽ̨ÉϵĶàÏ̳߳ÌÐò¿ª·¢Ïà¶ÔÓ¦ÆäËûƽ̨£¨±ÈÈç Windows£©µÄ¶àÏß³Ì API ÓÐһЩϸ΢ ......

linux³£ÓÃcÍ·Îļþ

linux³£ÓÃÍ·ÎļþÈçÏ£º
POSIX±ê×¼¶¨ÒåµÄÍ·Îļþ
<dirent.h>       
Ŀ¼Ïî
<fcntl.h>         Îļþ¿ØÖÆ
<fnmatch.h>    ÎļþÃûÆ¥ÅäÀàÐÍ
<glob.h>   
·¾¶ÃûģʽƥÅäÀàÐÍ
< ......

LinuxÏÂÈí¼þ°²×°

LinuxÏÂÈí¼þ°ü°²×°·½·¨
1.ÒѾ­±àÒë´ò°üºÃµÄxxx.rpm
  ʹÓÃrpmÃüÁÐèÒª´ò¿ªÖնˣ¬Çл»µ½xxx.rpmËùÔÚĿ¼£¬rpm -ivh xxx.rpm
2.´ò°üºÃµÄÔ´Âë°üxxx.src.rpm
  ÒªÓÃrpm -rebuild xxx.src.rpmÃüÁîÀ´ÖØÐÂÉú³É
  ×¢£º¶ÔÓÚrpmÃüÁîµÄÏê½â¿ÉÒÔʹÓà $rpm -helpÀ´²é¿´
3.°²×°³ÌÐòxxx.bin
  ÏÈ°Ñxxx.bin¸ÄÎ ......

Javaͨ¹ýSamba·þÎñ²Ù×÷Linux¹²ÏíÎļþ


Ê×ÏÈÔÚLinuxÉÏ´´½¨Ò»¸ö¹²ÏíÎļþ¼Ð
mkdir /home/user/share
ÓÃrootÓû§Æô¶¯samba·þÎñ
service smb start
ÐÞ¸Äsmb.confÎļþ
sudo gedit /etc/samba/smb.conf »òÕß vi /etc/samba/smb.conf
[share]
path = /home/user/share
...
writable = yes
´´½¨¹²ÏíÓû§²¢ÉèÖÃÃÜÂë
sudo useradd smbusr
sudo smbpasswd -a s ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ