fleet/scripts/mdm/linux/linux-unlock.sh

12 lines
272 B
Bash
Raw Normal View History

2023-12-12 20:52:27 +00:00
#!/bin/sh
# Unlock password for all non-root users
awk -F':' '{ if ($3 >= 1000 && $3 < 60000) print $1 }' /etc/passwd | while read user
do
echo "$user"
if [ "$user" != "root" ]; then
echo "Unlocking password for $user"
passwd -u $user
fi
done