sudo »ç¿ëÇϱâ
ÀÛ¼ºÀÚ °ü¸®ÀÚ ÀÛ¼º½Ã°£ 2006-04-21 14:23:56
 

½Ã½ºÅÛ°ü¸®½Ã ºÎºÐÀûÀÎ root±ÇÇÑÀ» ¿ä±¸ÇÏ´Â ÀϹݰèÁ¤ÀÚµéÀÌ ÀÖ´Ù
À̵鿡°Ô su¸¦ Çã¿ëÇÏ¿© Àüü root ±ÇÇÑÀ» ³Ñ±æ¼ö´Â ¾ø°í
ºÎºÐÀûÀÎ root ±ÇÇÑÀ» Çã¿ëÇÏ·Á¸é ¾î¶»°Ô ÇؾßÇÒ±î?
ÀÌ¿¡ ´ëÇÑ ´äÀº sudo¶ó´Â ÇÁ·Î±×·¥ÀÌ´Ù.

»ç¿ë¹ýÀ» °£´ÜÈ÷ ¾Ë¾Æº¸ÀÚ

# pkgadd -d sudo-xxxx ¸¦ ½ÇÇàÇÏ¿© sudo°¡ ¼³Ä¡µÇ¾î ÀÖ´ÂÁö È®ÀÎÇÏÀÚ

# vi  /usr/local/etc/sudoers ¼³Á¤ÆÄÀÏÀ» ¿­¾î¼­
    root    ALL=(ALL) ALL
    jsp    ALL=/sbin/pstree, /usr/local/httpd/bin/apachectl

ÀÏ¹Ý °èÁ¤ÀÚ jsp¿¡°Ô pstree¸í·É°ú httpd¸í·É ±ÇÇÑÀ» Çã¿ëÇÑ ¿¹ÀÌ´Ù.

ÀÌÁ¦ ÀϹݰèÁ¤ jsp·Î À§ÀÇ ¸í·ÉÀ» ½ÇÇàÇÏ·Á¸é

# su jsp

$ sudo pstree

À̶§ password¸¦ ¹°¾îº¸¸é jspÀÇ password¸¦ ÀÔ·ÂÇÏ¸é ½ÇÇàÀÌ µÈ´Ù.


root °èÁ¤ÀÌ ¾Æ´Ñ ´Ù¸¥ °èÁ¤ÀÇ ±ÇÇÑÀÌ ÇÊ¿äÇÑ °æ¿ì¿£, sudo -u username <command> ·Î ¼öÇàÇϸé username °èÁ¤ÀÇ ±ÇÇÑÀ¸·Î <command>¸¦ ¼öÇàÇÑ´Ù.
sudo -u #uid <command> ¿Í °°ÀÌ uid°ªÀ» »ç¿ëÇÒ ¼öµµ ÀÖ´Ù.
ÀÌ À¯Àú¸¦ Runas user¶ó°í ÇÑ´Ù

¾ÆÁÖ °£´ÜÇÏÁö¸¸  À¯¿ëÇÑ ÇÁ·Î±×·¥ÀÎ°Í °°´Ù.


¸ñ·Ï | ÀÔ·Â | ¼öÁ¤ | ´äº¯ | »èÁ¦