search for: date_now

Displaying 7 results from an estimated 7 matches for "date_now".

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
3
Users list and the date the password will expire
...son)(objectClass=user)(sAMAccountName=$user))" msDS-UserPasswordExpiryTimeComputed | grep "msDS-UserPasswordExpiryTimeComputed: " | sed "s|msDS-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=pe...
2017 Feb 08
4
Users list and the date the password will expire
Hi list, long time no see! :) I was looking for an email reminder script for users whose password will expire. Some of our users are on long travels and will never see the Domain's default notification. I haven't found any complete (and simple) solution online. So I wrote one. In case it helps anyone, you find it below. You should only have to fill in the blanks for the the
2017 Feb 09
0
Users list and the date the password will expire
...Category=person)(objectClass=user)(sAMAccountName=$user))" msDS-UserPasswordExpiryTimeComputed | grep "msDS-UserPasswordExpiryTimeComputed: " | sed "s|msDS-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=...
2017 Feb 09
0
Users list and the date the password will expire
...Name=$user))" >> msDS-UserPasswordExpiryTimeComputed | grep >> "msDS-UserPasswordExpiryTimeComputed: " | sed >> "s|msDS-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 >&gt...
2017 Feb 09
0
Users list and the date the password will expire
...(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" msDS-UserPasswordExpiryTimeComputed | grep "msDS-UserPasswordExpiryTimeComputed: " | sed "s|msDS-UserPasswordExpiryTimeComputed: ||") UNIXTimeStamp=$(((${user_expire_date}/10000000)-11644473600)) date_now=$(date +%s) exp_days=$(((${UNIXTimeStamp} - ${date_now}) / 3600 / 24)) With the 'awk' the user is empty. Querying $user before the awk shows the correct user name without "DOMAIN\". This line seems not to be necessary for me. I also had to remove the quotes in the 3rd and...
2017 Feb 09
2
Users list and the date the password will expire
...(objectClass=user)(sAMAccountName=$user))" > msDS-UserPasswordExpiryTimeComputed | grep > "msDS-UserPasswordExpiryTimeComputed: " | sed > "s|msDS-UserPasswordExpiryTimeComputed: ||") > UNIXTimeStamp=$(((${user_expire_date}/10000000)-11644473600)) > date_now=$(date +%s) > exp_days=$(((${UNIXTimeStamp} - ${date_now}) / 3600 / 24)) > > With the 'awk' the user is empty. Querying $user before the awk shows > the correct user name without "DOMAIN\". This line seems not to be > necessary for me. > > I also had to...