Selaa lähdekoodia

cray: z9999-cray.org add bin/adexpire

so I can know when my ad password expires
cray
Mitch Tishmack 8 vuotta sitten
vanhempi
commit
208c296744
1 muutettua tiedostoa jossa 14 lisäystä ja 0 poistoa
  1. +14
    -0
      z9999-cray.org

+ 14
- 0
z9999-cray.org Näytä tiedosto

@@ -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.


Ladataan…
Peruuta
Tallenna