Displaying 7 results from an estimated 7 matches for "user_expire_d".
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
...||')
> if [ -z "${domainDN}" ]; then
> echo "Could not obtain AD rootDSE"
> exit 1
> fi
>
> user_list=$(wbinfo -u)
>
> for user in $user_list; do
> user=$(echo "${user}" | awk -F '\\' '{print $2}')
> user_expire_date=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s sub "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" msDS-UserPasswordExpiryTimeComputed | grep "msDS-UserPasswordExpiryTimeComputed: " | sed "s|msDS-UserPasswordExpiryTimeComput...
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
...mingContext' | sed 's|defaultNamingContext: ||')
if [ -z "${domainDN}" ]; then
echo "Could not obtain AD rootDSE"
exit 1
fi
user_list=$(wbinfo -u)
for user in $user_list; do
user=$(echo "${user}" | awk -F '\\' '{print $2}')
user_expire_date=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s sub "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))" msDS-UserPasswordExpiryTimeComputed | grep "msDS-UserPasswordExpiryTimeComputed: " | sed "s|msDS-UserPasswordExpiryTimeComput...
2017 Feb 09
0
Users list and the date the password will expire
...DN}" ]; then
>> echo "Could not obtain AD rootDSE"
>> exit 1
>> fi
>>
>> user_list=$(wbinfo -u)
>>
>> for user in $user_list; do
>> user=$(echo "${user}" | awk -F '\\' '{print $2}')
>> user_expire_date=$(ldbsearch --url="${LDBDB}" -b "${domainDN}"
>> -s sub
>> "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))"
>> msDS-UserPasswordExpiryTimeComputed | grep
>> "msDS-UserPasswordExpiryTimeComputed: " | sed...
2017 Feb 09
0
Users list and the date the password will expire
Actually, there were 2 problems. These lines work for me:
#user=$(echo "${user}" | awk -F '\\' '{print $2}')
user_expire_date=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s
sub "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))"
msDS-UserPasswordExpiryTimeComputed | grep
"msDS-UserPasswordExpiryTimeComputed: " | sed
"s|msDS-UserPasswordExpiryTimeCo...
2017 Feb 09
2
Users list and the date the password will expire
I am running this on a CentOS 6.7 DC with Samba version 4.2.5.
Ole
On 09.02.2017 13:40, Ole Traupe via samba wrote:
> Actually, there were 2 problems. These lines work for me:
>
> #user=$(echo "${user}" | awk -F '\\' '{print $2}')
> user_expire_date=$(ldbsearch --url="${LDBDB}" -b "${domainDN}" -s
> sub
> "(&(objectCategory=person)(objectClass=user)(sAMAccountName=$user))"
> msDS-UserPasswordExpiryTimeComputed | grep
> "msDS-UserPasswordExpiryTimeComputed: " | sed
> "s|msD...