2015년 9월 8일 화요일

데비안 리눅스 sudo 설치

데비안에 sudo를 설치 해본다.
설치를 하고 유저를 추가 해줘야한다..

1. sudo 설치
root@*******:/home/********# apt-get install sudo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 850 kB of archives.
After this operation, 2,694 kB of additional disk space will be used.
Get:1 http://ftp.kr.debian.org/debian/ jessie/main sudo amd64 1.8.10p3-1+deb8u2 [850 kB]
Fetched 850 kB in 3s (217 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 33426 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.10p3-1+deb8u2_amd64.deb ...
Unpacking sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up sudo (1.8.10p3-1+deb8u2) ...
Processing triggers for systemd (215-17+deb8u2) ...

2. sudo 에 user 추가
root@*******:/home/********sudo adduser ********* sudo
Adding user `*********' to group `sudo' ...
Adding user ********* to group sudo
Done.

3. visudo에 설정
  GNU nano 2.2.6                  File: /etc/sudoers.tmp

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
*****  ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

댓글 없음:

댓글 쓰기