add exercise4.sh

This commit is contained in:
mlot
2026-02-01 13:07:48 -05:00
parent 52e4ed37fc
commit e7f3c13fb6

View File

@@ -0,0 +1,17 @@
#!/bin/bash
FILE_NAME="/etc/shadow"
if [ -e $FILE_NAME ]
then
echo "Shadow passwords are enabled."
if [ -w $FILE_NAME ]
then
echo "You have permissions to edit /etc/shadow."
else
echo "You DO NOT have permissions to edit /etc/shadow"
fi
else
exit
fi