From cfc8a5ba787dd284d6bcd245bedd8072b6798fea Mon Sep 17 00:00:00 2001 From: MatMoul Date: Mon, 4 Jun 2018 22:37:50 +0200 Subject: [PATCH] Remove nobody user from users and sudoers config menu --- config/sudoers/menu | 2 +- config/users/menu | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/sudoers/menu b/config/sudoers/menu index eed0b19..b2a961d 100644 --- a/config/sudoers/menu +++ b/config/sudoers/menu @@ -19,7 +19,7 @@ sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0 case $sel in 'Add sudoer') - users=$(awk -F: '{if ($3 >= 1000) { print $1 } }' /etc/passwd) + users=$(awk -F: '{if ($3 >= 1000 && $3 <= 5000) { print $1 } }' /etc/passwd) userlist=() for itm in $users; do userlist+=("$itm" "") diff --git a/config/users/menu b/config/users/menu index cd8deb6..0b96ae7 100644 --- a/config/users/menu +++ b/config/users/menu @@ -18,7 +18,7 @@ sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0 case $sel in 'List Users') clear - awk -F: '{if ($3 >= 1000) { print $1 } }' /etc/passwd + awk -F: '{if ($3 >= 1000 && $3 <= 5000) { print $1 } }' /etc/passwd read -n1 -p "press a key to continue" ;; 'Add User') @@ -44,4 +44,4 @@ case $sel in ;; esac -exit 0 \ No newline at end of file +exit 0