Created scripts to get created users
parent
173a3f3d72
commit
7f3baa84fd
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
getent passwd | awk -F: '/^user/ {print $1}' | while read -r user; do
|
||||||
|
# Attempt to get the user's creation date from the shadow file
|
||||||
|
creation_date=$(sudo chage -l "$user" | grep 'Last password change' | cut -d: -f2)
|
||||||
|
echo "$user was created on $creation_date"
|
||||||
|
done
|
Loading…
Reference in New Issue