Convert PwdLastSet To A Human Readable Date

Skip to content HomeConvert pwdLastSet to a human readable date

Here it is a simple (and a bit hacky, I know) one-liner for bash shell (even under Windows if you are using Cygwin) to convert the cryptic pwdLastSet timestamp of Active Directory (which represent when a user has changed the last time his/her AD password)

D=128457325992343750; date -d "01/01/1601 UTC $(let D=D/10000000; echo $D) seconds"

where the very large number after the first D= it’s your pwdLastSet value. This strange timestamp it’s a 1/100 of a nanosecond (so, it’s 1/10^7 seconds) and the ticks are counted from January 1st, 1601. Don’t ask me why, probably they didn’t like the Epoch time :)

Share this:

  • Facebook
  • X
Like Loading...

Related

Post navigation Disable directory listing in Apache with Debian A handful of bash tips – part 1

Leave a comment Cancel reply

Δ

Search for: Active Directory Apt Aptitude arp problem asterisk bash batch mode Capabilities cron Debian debian bonding networking ethernet Dell dhcp dns fdisk fix fonality FreeBSD Gentoo gentoo tips portage eix gmail High availability howto hud hudlite imap Install iscsi keepalived Kernel Lcap Linux loopback LVS maildrop mail server mta multi-homed Mysql ncurses Networking non-interactive Oneliner Packages parted partition limit passwords Postfix Postmaster Rants replication Repo rpm deb conversion san sata problem serial number service tag shell Shell scripts smtp auth source squid Storage tcp tcp_check problem terabyte text editor Tips tool Unix Untrusted virtual ip wanem wan simulation Windows 2003 Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more, including how to control cookies, see here: Cookie Policy
  • Comment
  • Reblog
  • Subscribe Subscribed
    • The eternal fight between admins and computers
    • Sign me up
    • Already have a WordPress.com account? Log in now.
    • The eternal fight between admins and computers
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • View post in Reader
    • Manage subscriptions
    • Collapse this bar
%d Design a site like this with WordPress.comGet started

Tag » Active Directory Pwdlastset Convert To Date