公告版位
# sudo /usr/bin/dscl . -delete /Users/administrator

Reference: https://www.jamf.com/jamf-nation/discussions/21590/unhide-delete-a-user-account

dreamtails 發表在 痞客邦 留言(0) 人氣()

# vi /etc/samba/smb.conf
====================
[Global]
min protocol = SMB2
ea support = yes
vfs objects = catia fruit streams_xattr  
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes 
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes 
fruit:delete_empty_adfiles = yes 
......
====================

Reference: https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X

dreamtails 發表在 痞客邦 留言(0) 人氣()

# vi /etc/samba/smb.conf
==================
...
# Disable Port-139(NetBIOS-ssn)
disable netbios = yes
smb ports = 445
...
==================

Reference: http://pig.made-it.com/samba-setup.html

dreamtails 發表在 痞客邦 留言(0) 人氣()

# time rsync -avt --partial --delete --progress /mnt/Source/folder /Backup/Destination/

-t: 保留修改時間
--partial: 保留部分傳輸的文件
--delete: 刪除接收端上的"發送端不存在的文件"
--progress: 顯示傳輸進度

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Write Config to LDAP datebase:

# vi add_slapdlog.ldif
=========
dn: cn=config
changeType: modify
replace: olcLogLevel
olcLogLevel: stats
=========

# ldapmodify -Y external -H ldapi:/// -f add_slapdlog.ldif

# systemctl force-reload slapd

 

2. Add OpenLDAP log in rsyslog:

# vi /etc/rsyslog.d/10-slapd.conf
========
$template slapdtmpl,"[%$DAY%-%$MONTH%-%$YEAR% %timegenerated:12:19:date-rfc3339%] %app-name% %syslogseverity-text% %msg%\n"
local4.*    /var/log/slapd.log;slapdtmpl
========

# service rsyslog restart

# ldapsearch -Y external -H ldapi:/// -b dc=dreamtails,dc=local

# sudo cat /var/log/slapd.log

 

Reference: http://tutoriels.meddeb.net/openldap-tutorial-log/

dreamtails 發表在 痞客邦 留言(0) 人氣()

# Step 1: Need root permission.
sudo bash

# Step 2: Update your repositories
apt update -y

# Step 3: Install pip for Python 3
apt install python3-pip

# Step 4: Use pip to install VirtualEnv
pip3 install virtualenv

# Step 5: Create a Virtual Environment of Python 3, the virtual env name is "myEnv".
virtualenv -p python3 myEnv

# Step 6: Activate a new Python 3 virtual env.
# or "source env3/bin/activate"
. myEnv/bin/activate

# Step 7-1: You can make sure you are now working with Python 3.
python --version

# Step 7-2: You can make sure the Python 3's Path.
which python

# Step 8: Leave the virtual env.
deactivate

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ unzip -O big5 MyTest.zip

dreamtails 發表在 痞客邦 留言(0) 人氣()

# cat > /etc/systemd/system/iptables.service << EOF
[Unit]
Before=network.target
[Service]
Type=oneshot
ExecStart=/sbin/iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j REJECT
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
EOF

# systemctl enable --now iptables.service

# systemctl start iptables.service

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. 點擊MyAPP.dmg

2. 將MyAPP拉到 /<PATH>

3. 鍵入以下指令:
    $ sudo productbuild --component /<PATH>/MyAPP.app /<PATH>/MyPKG.pkg

 

參考: https://www.hexnode.com/mobile-device-management/help/convert-dmg-to-pkg-mac/

dreamtails 發表在 痞客邦 留言(0) 人氣()

# sed -i "3s/^[^#]/#&/" /etc/openvpn/server/server.conf

dreamtails 發表在 痞客邦 留言(0) 人氣()

$ ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "dreamtails@pixnet.cc"

Reference: https://medium.com/risan/upgrade-your-ssh-key-to-ed25519-c6e8d60d3c54

 

dreamtails 發表在 痞客邦 留言(0) 人氣()

Command:
$ git clone https://192.168.100.100/dreamtails/Dreamtails_Project.git


Error Message:
fatal: unable to access 'https://192.168.100.100/dreamtails/Dreamtails_Project.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none


How to Resolve?

[For Git]

$ git config --global http.sslVerify false


[For Linux]

$ export GIT_SSL_NO_VERIFY=1


[For Windows]

$ set GIT_SSL_NO_VERIFY 1

 

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Prepare your environment.
$ sudo apt install libncurses5-dev \
        libgtk2.0-dev libatk1.0-dev \
        libcairo2-dev python-dev \
        python3-dev git

2. Remove Old VIM.
$ sudo apt remove vim vim-runtime gvim

3. Install VIM.
$ cd /usr && sudo git clone https://github.com/vim/vim.git && cd vim  

$ sudo ./configure --with-features=huge \
        --enable-multibyte \
        --enable-pythoninterp=yes \
        --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ \
        --enable-python3interp=yes \
        --with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/ \
        --enable-gui=gtk2 \
        --enable-cscope \
        --prefix=/usr/local/

$ sudo make VIMRUNTIMEDIR=/usr/local/share/vim/vim81 

4. Preparing deb package using "checkinstall"
$ sudo apt install checkinstall
$ cd /usr/vim && sudo checkinstall

5. Set VIM as a default editor
$ sudo update-alternatives --install /usr/bin/editor editor /usr/local/bin/vim 1
$ sudo update-alternatives --set editor /usr/local/bin/vim
$ sudo update-alternatives --install /usr/bin/vi vi /usr/local/bin/vim 1
$ sudo update-alternatives --set vi /usr/local/bin/vim

6. Verify that you're running the new Vim binary by looking
$ vim --version | grep python

 

Reference: https://vi.stackexchange.com/questions/11526/how-to-enable-python-feature-in-vim

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. 自己目前蠻推薦以下這個字型:
Fantasque Sans Mono - https://github.com/belluzj/fantasque-sans

2. 將您要換的字型放到以下路徑
$ mv FantasqueSansMono-*.ttf ~/.fonts/

3. 更新字型資料庫
$ fc-cache -vf ~/.fonts/

4. 安裝Gnome-Tweak-Tool
$ apt install -y gnome-tweak-tool

5. 執行Gnome-Tweak-Tool去更改字型
$ gnome-tweaks

dreamtails 發表在 痞客邦 留言(0) 人氣()

1. Install Package to /usr/local
$ ./configure --prefix=/usr/local
$ make
$ sudo make install prefix=/usr/local

2. Uninstall Package
$ make clean
$ make uninstall

dreamtails 發表在 痞客邦 留言(0) 人氣()