[Samba] Users list and the date the password will expire
Mark Foley
mfoley at ohprs.org
Sun Mar 26 23:31:48 UTC 2017
On Sun, 26 Mar 2017 19:53:01 +0100 Rowland Penny wrote:
>
> On Sun, 26 Mar 2017 14:32:53 -0400
> Mark Foley via samba <samba at lists.samba.org> wrote:
>
>
> > as root:
> >
> > ldbsearch --url=ldap://mail -b "DC=hprs,DC=local" -s sub
> > "(&(sAMAccountType=805306368)(sAMAccountName=mark))"
> > msDS-UserPasswordExpiryTimeComputed
> >
> > search error - LDAP error 1 LDAP_OPERATIONS_ERROR - <00002020:
> > Operation unavailable without authentication> <>
> >
> > When I added `-U user%pass` it worked. I don't suppose there is a way
> > to NOT specify the password? I'd rather not have to propigate the
> > domain administrator's password among all the domain members (-N did
> > not work).
> >
> > Thanks --Mark
> >
>
> Sorry, forgot about the required authentication, try it with '-P'
> without '-U administrator'
>
> Rowland
Great! That did it. Final command:
expireTime=`ldbsearch --url=ldap://mail -b "DC=hprs,DC=local" -P -s sub "(&(sAMAccountType=805306368)(sAMAccountName=$USER))" msDS-UserPasswordExpiryTimeComputed`
Thanks, --Mark
More information about the samba
mailing list