diff --git a/files/image_config/bash/bash.bashrc b/files/image_config/bash/bash.bashrc index 6651a51cee..9914e84d76 100644 --- a/files/image_config/bash/bash.bashrc +++ b/files/image_config/bash/bash.bashrc @@ -55,4 +55,4 @@ if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-no fi # Automatically log out console ttyS* sessions after 15 minutes of inactivity -tty | grep ttyS >/dev/null && TMOUT=900 +tty | egrep -q '^/dev/ttyS[[:digit:]]+$' && TMOUT=900 diff --git a/files/image_config/sudoers/sudoers b/files/image_config/sudoers/sudoers index e1f300a602..966252712c 100644 --- a/files/image_config/sudoers/sudoers +++ b/files/image_config/sudoers/sudoers @@ -54,6 +54,9 @@ ALL ALL=NOPASSWD: READ_ONLY_CMDS # Prevent password related command into syslog Defaults!PASSWD_CMDS !syslog +# Make sure sudo password prompt times out after 5 mins +Defaults passwd_timeout=5 + # See sudoers(5) for more information on "#include" directives: #includedir /etc/sudoers.d