作者: william
運作中AD Server,vm操作不當被刪,還原後悲哀結局
運作中網域伺服器(AD Server), 因操作不當其vm被刪除, 剛好兩天前有snapshot, 於是還原起來, 乍看之下運作正常, 其實是失敗.
因內網有兩個AD, 被刪除AD的資料早已跟另一台同步,因此回朔兩天前AD, 其資料也是異常的, 間接造成各式各樣,依賴網域認證的系統, 跟著異常, 好慘.
原本想說來個強制重新同步,將還原的AD,強制從正常的AD同步回來, 但是怕怕的, 還是決定刪了就刪了,也不還原, 再另外安裝一台AD重新同步吧.
postfix ldap測試/查詢帳號是否存在
postfix 很常見搭配微軟的AD , AD的設定檔長這樣, 檔案名稱為 xxx.cf
server_host = <AD server IP> search_base = ou=xx,dc=yyy,dc=com version = 3 query_filter = (&(objectclass=*)(mail=%s)) result_attribute = samaccountname #Account from DC result_format = %s/Maildir/ bind = yes bind_dn = cn=zzz,cn=Users,dc=yyy,dc=com bind_pw = password
配合以下指令,可以用來查詢email對應的帳號是否正確
postmap -q abc@yyy.com ldap:/directory/xxx.cf
這樣就可以測試帳號是否存在了
github desktop非官方linux版本
https://github.com/shiftkey/desktop
ubuntu 安裝方式:
1. wget https://github.com/shiftkey/desktop/releases/download/xxx.deb 2. sudo apt-get install gdebi-core 3. sudo gdebi xxx.deb
eclipse內建的egit 一定要安裝lfs功能
git lfs下載時出現404 object not found問題
解決方式
- 下載mirror git專案
git clone –mirror <git url> - 找出有問題的object OID
cd git專案
git lfs fetch –all - 透過OID,找出有問題的LFS檔案, 並且把檔案名稱都記下來
git log –all -p -S <OID> - 下載BFG repo cleaner (java 程式)
https://rtyley.github.io/bfg-repo-cleaner/ - 清理檔案
java -jar bfg.jar –delete-files <file name> <git location : xxx.git> - 重新整理
cd xxx.git
git reflog expire –expire=now –all && git gc –prune=now –aggressive - 收工
git push