Displaying 4 results from an estimated 4 matches for "then_sec".
2017 Feb 08
3
Users list and the date the password will expire
...rch -H /usr/local/samba/private/sam.ldb -s
> > sub -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 [...
2017 Feb 08
4
Users list and the date the password will expire
...er_list; do
set_date=`ldbsearch -H /usr/local/samba/private/sam.ldb -s sub
-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_day...
2017 Feb 08
0
Users list and the date the password will expire
...> set_date=`ldbsearch -H /usr/local/samba/private/sam.ldb -s sub
> -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_d...
2017 Feb 09
0
Users list and the date the password will expire
...mba/private/sam.ldb -s
>>> sub -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 ))
>>>
>>>...