Last active
August 29, 2015 14:24
-
-
Save pmbuko/132bfd7b45c806d84bab to your computer and use it in GitHub Desktop.
Revisions
-
pmbuko revised this gist
Jul 7, 2015 . 1 changed file with 8 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ #!/bin/bash USER=$(/usr/bin/python -c \ 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser;\ print SCDynamicStoreCopyConsoleUser(None, None, None)[0]') xWin=$(/usr/bin/dscl localhost read /Search/Users/$USER \ msDS-UserPasswordExpiryTimeComputed 2>/dev/null |\ /usr/bin/awk '/dsAttrTypeNative/{print $NF}') xUnix=$(echo "($xWin/10000000)-11644473600" | bc) /bin/date -r $xUnix -
pmbuko revised this gist
Jul 2, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ #!/bin/bash expireDateWin=$(dscl localhost read /Search/Users/$USER \ msDS-UserPasswordExpiryTimeComputed 2>/dev/null |\ awk '/dsAttrTypeNative/{print $NF}') expireDateUnix=$(echo "($expireDateWin/10000000)-11644473600" | bc) date -r $expireDateUnix -
pmbuko created this gist
Jul 2, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/bin/bash expireDateWin=$(dscl localhost read /Search/Users/$USER msDS-UserPasswordExpiryTimeComputed 2>/dev/null |\ awk '/dsAttrTypeNative/{print $NF}') expireDateUnix=$(echo "($expireDateWin/10000000)-11644473600" | bc) date -r $expireDateUnix