gnome-terminal로 sudo 인증 유지

gnome-terminal로 sudo 인증 유지

한 탭에서 사용하면 다른 탭을 열고 사용할 때마다 비밀번호를 다시 입력할 필요가 없도록 sudo세션을 여러 탭에서 공유할 수 있습니까 ?gnome-terminalsudosudo

답변1

sudo인증을 공유하려면모두셸 세션(특정 인스턴스의 탭뿐만 아니라 gnome-terminal)을 실행하려면 파일에 다음 줄을 추가해야 합니다 /etc/sudoers( visudo이렇게 하려면 사용).

Defaults !tty_tickets

에서 man sudoers:

   sudoers uses time stamp files for credential caching.  Once a user has
   been authenticated, a time stamp is updated and the user may then use
   sudo without a password for a short period of time (15 minutes unless
   overridden by the timeout option.  By default, sudoers uses a tty-based
   time stamp which means that there is a separate time stamp for each of
   a user's login sessions.  The tty_tickets option can be disabled to
   force the use of a single time stamp for all of a user's sessions.

   [...]

   tty_tickets     If set, users must authenticate on a per-tty basis.
                   With this flag enabled, sudo will use a file named for
                   the tty the user is logged in on in the user's time
                   stamp directory.  If disabled, the time stamp of the
                   directory is used instead.  This flag is on by default.

관련 정보