[Samba] How to get users last Login time

Rowland Penny rpenny at samba.org
Wed Apr 24 09:33:40 UTC 2019

On Wed, 24 Apr 2019 11:00:39 +0200
Sven Schwedas via samba <samba at lists.samba.org> wrote:

> > https://blogs.technet.microsoft.com/askds/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works/  
> It was literally designed for *this exact use case*.

Yes, but not very well ;-)

It actually says 'the lastLogontimeStamp will be 9-14 days behind the
current date.'

So what happens if a user has logged in 6 days ago and you want to
delete users that have been inactive for over 10 days ?

I know this isn't a likely scenario, but, hopefully, you take my
point, to get the correct last logon time, you need to check all DC's
for a users 'lastLogon' attribute.


More information about the samba mailing list