2020年4月6日 星期一

ubuntu nfs server 小記

哎呀,最近某老骨頭server葛屁了,還好資料都在,那就來重裝一下吧!

裝好後要起nfs server,就照網路上的裝好啦!老骨頭nfs client也可以mount,但................
好慢啊!阿婆走路都比你快啊!終於log丟出error了:No locks available,趁勢google一下找到解決方法。

sudo systemctl enable rpc-statd  # Enable statd on boot
sudo systemctl start rpc-statd   # Start statd for the current session

2020年3月16日 星期一

sqlite group_concat

記錄一下group_concat.

sqlite> select group_concat(printf('%s@cloud.xxx.edu.tw',name),';') as userList from tel;
userList
--------------------------------------------------------------------
user1@cloud.xxx.edu.tw;user2@cloud.xxx.edu.tw;user3@cloud.xxx.edu.tw

2020年1月16日 星期四

ubuntu join ad

嗯,最近心中浮現一個想法,就是你儂我儂世界大同!何不將LINUX加到AD裡玩玩?

      OS:ubuntu 18.04

  1. 1. apt-get -y install realmd sssd sssd-tools samba-common krb5-user packagekit samba-common-bin samba-libs adcli ntp 
  
  1. 2. realm join -U Administrator cloud.xxx.edu.tw -V ,有看到成功加入就OK。
  
  1. 3. realm list for test,看有沒有咚咚跑出來。

  1. 4. realm permit --all,可能需要的一個指令,Not so sure.
  
  1. 5. /etc/sssd/sssd.conf file automatically produced from the realm join: 
  
  1. If a pam_acct_mgmt error is observed, edit /etc/pam.d/common-account by commenting out this line: 

#account [default=bad success=ok user_unknown=ignore] pam_sss.so 

Note. It’s important if  dovecot server is running.  若dovecot認證失敗,把debug開起來,如果看到pam_acct_mgmt() permission deny之類錯誤,就是這個啦!
  
  1. 6. Login to server to test using the username@domain.example format.  If you wish to have your users login with username, instead of username@domain  you can adjust this line in the sssd.conf like so: 

use_fully_qualified_names = False 

             Then restart the sssd service.