|
|
|
@@ -6,6 +6,20 @@ |
|
|
|
#+PROPERTY: header-args :cache yes :padline no :mkdirp yes :comments no |
|
|
|
|
|
|
|
* Cray specific overrides |
|
|
|
* ~/bin/adexpire |
|
|
|
|
|
|
|
So I can find out when my ad password expires. |
|
|
|
|
|
|
|
#+BEGIN_SRC sh :padline no :tangle (tangle/file "bin/adexpire" (bound-and-true-p cray-p)) :mkdirp t |
|
|
|
#!/usr/bin/env sh |
|
|
|
adchange=$(LDAPTLS_REQCERT=never ldapsearch -ZZ -x -h cfdc01.us.cray.com -b 'OU=Users,OU=Cray Objects,DC=americas,DC=cray,DC=com' -s sub "(sAMAccountName=$(whoami))" pwdLastSet | awk '/^pwdLastSet/ { print $2 }') |
|
|
|
today=$(date +%s) |
|
|
|
days=$(( ((adchange / 10000000 - 11628835200) - today) / 86400 )) |
|
|
|
if [ $days -le 14 ]; then |
|
|
|
echo "AD password expires in $days days" |
|
|
|
fi |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
** ~/.gnus |
|
|
|
|
|
|
|
Use gnus in emacs for email. Outside of normal emacs since its easier. |
|
|
|
|