Skip to content

Commit 616ebc3

Browse files
authored
Update base_setup_new.sh
1 parent c022b65 commit 616ebc3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

base_setup_new.sh

+13
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ if [[ "$EUID" -ne 0 ]]; then
4343
fi
4444

4545

46+
##Testing
47+
#
48+
#root Authentication check if Password or Pubkey used in this session #
49+
#
50+
rootsessioncheck="$(grep root /etc/shadow | cut -c 1-6)"
51+
if [[ "$rootsessioncheck" = 'root:x' ]]; then
52+
echo " root password not set - Pubkey login is used in this session "
53+
else
54+
echo " root password is set - Password login is used in this session "
55+
fi
56+
57+
58+
4659
#
4760
# OS check
4861
#

0 commit comments

Comments
 (0)