- echo "$seckey" | grep ^uid: | cut -d: -f6,7,10 | \
- while IFS=: read create expire uid ; do
- # FIXME: should we be doing any checking on the form
- # of the User ID? Should we be unmangling it somehow?
- if [ "$create" ] && (( "$create" > "$curdate" )); then
- echo "User ID '$uid' was created in the future(?!). Is your clock correct?"
- echo "Recommendation: Check clock ($(date +%F_%T)); use NTP?"
- fi
- if [ "$expire" ] ; then
- if (( "$expire" < "$curdate" )); then
- echo "User ID '$uid' is expired!"
- # FIXME: recommend a way to resolve this
- elif (( "$expire" < "$warndate" )); then
- echo "User ID '$uid' expires in less than $warnwindow:" $(date -d "$(( $expire - $curdate )) seconds" +%F)
+ echo "$seckey" | grep ^uid: | cut -d: -f6,7,10 | \
+ while IFS=: read create expire uid ; do
+ # FIXME: should we be doing any checking on the form
+ # of the User ID? Should we be unmangling it somehow?
+
+ if [ "$create" ] && (( "$create" > "$curdate" )); then
+ echo "! User ID '$uid' was created in the future(?!). Is your clock correct?"
+ echo " - Recommendation: Check clock ($(date +%F_%T)); use NTP?"
+ fi
+ if [ "$expire" ] ; then
+ if (( "$expire" < "$curdate" )); then
+ echo "! User ID '$uid' is expired."