search for: mail_str

Displaying 9 results from an estimated 9 matches for "mail_str".

Did you mean: mail_st
2017 Feb 08
4
Users list and the date the password will expire
...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/private/sam.ldb -s sub -b $basedn cn=$user | grep mail` echo "Gotcha: $user" | mail -s "WARNING: Your domain account password will expire in $exp_days days!" ${mail_string:6} fi fi done
2017 Feb 09
3
Users list and the date the password will expire
...d: ||") > UNIXTimeStamp=$((("${user_expire_date}"/10000000)-11644473600)) > date_now=$(date +%s) > exp_days=$((("${UNIXTimeStamp}" - "${date_now}") / 3600 / 24)) > if [ "${exp_days}" -le "0" ]; then > mail_string=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s sub "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" mail | grep mail: | sed "s|mail: ||") > if [ -n "${mail_string}" ]; then > echo "Gotcha...
2017 Feb 09
0
Users list and the date the password will expire
...-UserPasswordExpiryTimeComputed: ||") UNIXTimeStamp=$((("${user_expire_date}"/10000000)-11644473600)) date_now=$(date +%s) exp_days=$((("${UNIXTimeStamp}" - "${date_now}") / 3600 / 24)) if [ "${exp_days}" -le "0" ]; then mail_string=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s sub "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" mail | grep mail: | sed "s|mail: ||") if [ -n "${mail_string}" ]; then echo "Gotcha: ${user}&qu...
2017 Feb 09
0
Users list and the date the password will expire
...t;> UNIXTimeStamp=$((("${user_expire_date}"/10000000)-11644473600)) >> date_now=$(date +%s) >> exp_days=$((("${UNIXTimeStamp}" - "${date_now}") / 3600 / 24)) >> if [ "${exp_days}" -le "0" ]; then >> mail_string=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s >> sub >> "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" >> mail | grep mail: | sed "s|mail: ||") >> if [ -n "${mail_string}" ]; then &...
2017 Feb 08
3
Users list and the date the password will expire
...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/private/sam.ldb -s sub -b $basedn cn=$user | grep > > mail` echo "Gotcha: $user" | mail -s "WARNING: Your > > domain account password will expire in $exp_days days!" > > ${mail_string:6} > > > >...
2017 Feb 09
5
Users list and the date the password will expire
On Thu, 9 Feb 2017 12:49:12 +0100 Ole Traupe via samba <samba at lists.samba.org> wrote: > Never mind. However, with your update I get the following error right > on the first found "user": > > ./mailtest_rowland.sh: line 27: (""/10000000)-11644473600: syntax > error: operand expected (error token is """/10000000)-11644473600") >
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
2017 Feb 08
0
Users list and the date the password will expire
...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/private/sam.ldb -s sub -b $basedn cn=$user | grep mail` > echo "Gotcha: $user" | mail -s "WARNING: Your > domain account password will expire in $exp_days days!" ${mail_string:6} > > fi...
2017 Feb 09
0
Users list and the date the password will expire
...f_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/private/sam.ldb -s sub -b $basedn cn=$user | grep >>> mail` echo "Gotcha: $user" | mail -s "WARNING: Your >>> domain account password will expire in $exp_days days!" >>> ${mail_string:6} >>> >&...