search for: now_sec

Displaying 5 results from an estimated 5 matches for "now_sec".

Did you mean: new_seq
2017 Feb 08
3
Users list and the date the password will expire
...'0-9'` > > > > if [ $set_date ] && [ $set_date -gt 1 ]; then > > > > UNIXTimeStamp=$((($set_date/10000000)-11644473600)) > > then_sec=`date -d "1970-01-01 $UNIXTimeStamp sec > > GMT" +%s` > > now_sec=`date +%s` > > diff_days=$(( ( $now_sec - $then_sec )/60/60/24 )) > > exp_days=$(( $max_pwAge - $diff_days )) > > > > if [ $exp_days == 90 ] || [ $exp_days == 60 ] || [ > > $exp_days == 30 ]; then > > > >...
2017 Feb 08
4
Users list and the date the password will expire
...-b $basedn cn=$user | grep pwdLastSet | tr -dc '0-9'` if [ $set_date ] && [ $set_date -gt 1 ]; then UNIXTimeStamp=$((($set_date/10000000)-11644473600)) then_sec=`date -d "1970-01-01 $UNIXTimeStamp sec GMT" +%s` now_sec=`date +%s` diff_days=$(( ( $now_sec - $then_sec )/60/60/24 )) exp_days=$(( $max_pwAge - $diff_days )) if [ $exp_days == 90 ] || [ $exp_days == 60 ] || [ $exp_days == 30 ]; then mail_string=`ldbsearch -H /usr/local/samba...
2017 Feb 08
0
Users list and the date the password will expire
...=$user | grep pwdLastSet | tr -dc '0-9'` > > if [ $set_date ] && [ $set_date -gt 1 ]; then > > UNIXTimeStamp=$((($set_date/10000000)-11644473600)) > then_sec=`date -d "1970-01-01 $UNIXTimeStamp sec GMT" > +%s` > now_sec=`date +%s` > diff_days=$(( ( $now_sec - $then_sec )/60/60/24 )) > exp_days=$(( $max_pwAge - $diff_days )) > > if [ $exp_days == 90 ] || [ $exp_days == 60 ] || [ > $exp_days == 30 ]; then > > mail_string=`l...
2017 Feb 09
0
Users list and the date the password will expire
...gt; >>> if [ $set_date ] && [ $set_date -gt 1 ]; then >>> >>> UNIXTimeStamp=$((($set_date/10000000)-11644473600)) >>> then_sec=`date -d "1970-01-01 $UNIXTimeStamp sec >>> GMT" +%s` >>> now_sec=`date +%s` >>> diff_days=$(( ( $now_sec - $then_sec )/60/60/24 )) >>> exp_days=$(( $max_pwAge - $diff_days )) >>> >>> if [ $exp_days == 90 ] || [ $exp_days == 60 ] || [ >>> $exp_days == 30 ]; then >&g...
2017 Feb 09
1
Users list and the date the password will expire
On 02/09/2017 11:25 AM, Ole Traupe via samba wrote: > Exactly, and got reminded that I don't have to grep anything but can ask > for specific parameters. Been a while that I used ldbsearch. ;) > So there will be an updated version of your script? :-) Your script is something we could use as well, appreciated! MJ