첨부 실행 코드는 나눔고딕코딩 폰트를 사용합니다.
------------------------------------------------------------------------------------------------------------------------------------------------------
728x90
728x170

■ sudo 명령 사용시 패스워드 입력없이 사용하는 방법을 보여준다.

 

1. CTRL + ALT + T 키를 눌러서 [터미널]을 실행한다.

 

2. [터미널]에서 아래 명령을 실행한다.

 

▶ 실행 명령

sudo nano /etc/sudoers

 

3. /etc/sudoers 파일에서 특정 사용자에 대한 패스워드 입력 생략 설정을 추가하고 저장한다.

 

▶ 파일 편집

#
# 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:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL
king    ALL=NOPASSWD:ALL

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

#includedir /etc/sudoers.d

 

※ 위의 경우 king 사용자 계정에 대해 패스워드 입력 생략 설정을 추가하였다.

728x90
그리드형(광고전용)
Posted by icodebroker
,