레이블이 데비안인 게시물을 표시합니다. 모든 게시물 표시
레이블이 데비안인 게시물을 표시합니다. 모든 게시물 표시

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

2012년 2월 14일 화요일

우분투 / 데비안 네트워크 설정

1. Version : Ubuntu 11.10

2. 경로
/etc/network/interfaces

3. 설정
자동 IP경우
auto eth0 <<- 추가
iface eth0 inet dhcp

수동 IP경우
auto eth0 <<- 추가
iface eth0 inet static
address 192.168.1.90      # IP 주소
netmask 255.255.255.0     # Subnet mask
gateway 192.168.1.254     # Gateway
## option
network 192.168.1.0           # Network ID
broadcast 192.168.1.255   # Broadcast

5. 적용
수정 후 network 재시작
$sudo /etc/init.d/networking restart (우분투? )
service networking restart (데비안) <-- 추가

6. 참고 사이트
데비안 공식 (링크#2)

* 콘솔에서 작업하는 경우
NIC 종료 : ifdown eth0
NIC 시작 : ifup eth0
을 사용 network를 재시작 할 수 있지만 작업 공간이 터미널일 경우에는 "5.번" 항목처럼 하는 것을 추천한다.


추가 (2017.02.15.)
네트워크 설정 변경 후 자동으로 인터페이스가 올라오지 않는 경우가 있다.
이렇게 하면 된다.
/etc/network/interface 파일에 iface eth[n] 항목 위에 인터페이스가 자동으로 올라올 수 있도록
auto eth[n] 이라고 추가해준다. (링크#1)

** dns 설정
/etc/network/interfaces dns-nameserver 항목 및 /etc/resolve.conf