Przeglądaj źródła

Remove logins via serial console

Bob Mottram 8 lat temu
rodzic
commit
8e9933725d
1 zmienionych plików z 10 dodań i 0 usunięć
  1. 10
    0
      src/freedombone-utils-setup

+ 10
- 0
src/freedombone-utils-setup Wyświetl plik

@@ -409,6 +409,13 @@ function limit_user_logins {
409 409
     fi
410 410
 }
411 411
 
412
+function remove_serial_logins {
413
+    if grep 'ttyS' /etc/securetty; then
414
+        cp /etc/securetty /etc/securetty_old
415
+        sed -i '/ttyS/d' /etc/securetty
416
+    fi
417
+}
418
+
412 419
 function setup_firewall {
413 420
     function_check create_completion_file
414 421
     create_completion_file
@@ -433,6 +440,9 @@ function setup_utils {
433 440
     read_config_param "PROJECT_REPO"
434 441
     write_config_param "PROJECT_REPO" "$PROJECT_REPO"
435 442
 
443
+    function_check remove_serial_logins
444
+    remove_serial_logins
445
+
436 446
     function_check set_max_login_tries
437 447
     set_max_login_tries 10
438 448