2023년 신상 호텔 리스트
최근에 오픈한 호텔을 찾는다면 살펴보세요

Ubuntu - 매번 sudo 비밀번호 입력하지 않게 설정하기

조회수: 845

sudo 비밀번호 매번 입력하기 아주 귀찮다.

설정을 해보자.

sudo visudo 실행하자. 아래와 같은 화면이 나온다.

 

# 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

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

#includedir /etc/sudoers.d

 

마지막 자리에 james ALL=(ALL) NOPASSWD: ALL 입력하고 저장하면 된다.

james 공간에 본인 username을 넣으면 된다.