Files
shellScripting/shell_scripting_succinctly/exercise4.sh
2026-02-01 13:07:48 -05:00

18 lines
264 B
Bash
Executable File

#!/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