Skip to main content

Posts

Showing posts from February, 2019

Kali Linux on Raspberry Pi 2

Download Kali Linux for Raspberry Pi 2 Use xzcat to decompress and then dd to image Kali Linux to microSD on Windows 10. or use 7-zip to extract kali-linux-2019.1-rpi3-nexmon.img image file, then use rufus to write image to microSD card Login Kali Linux with default username root and password toor Tight VNC Server root@kali:~# apt install tightvncserver root@kali:~# vncserver :1 You will require a password to access your desktops. Password: Warning: password truncated to the length of 8. Verify: Would you like to enter a view-only password (y/n)? n xauth: file /root/.Xauthority does not exist New 'X' desktop is kali:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/kali:1.log root@kali:~# Kill vncserver root@kali:~# vncserver -kill :1 Killing Xtightvnc process ID 16102 root@kali:~#

ThinkPad X240, X250 - Hard Disk Drive and Solid State Drive Replacement

Windows: Set Account Expire

Forget is human being's nature. Let's set account to expire automatically for contractors, temporary employees net user username /expire:12/31/2019 Replace username with the account to be expired. If run successfully, that account will be expired at 00:00 December 31st, 2019

RHEL: Install MySQL

[tuyendq@DangQuocTuyen ~]$ sudo yum list mysql Loaded plugins: product-id, search-disabled-repos, subscription-manager Error: No matching Packages to list [tuyendq@DangQuocTuyen ~]$ sudo yum install mysql Loaded plugins: product-id, search-disabled-repos, subscription-manager Resolving Dependencies --> Running transaction check ---> Package mariadb.x86_64 1:5.5.60-1.el7_5 will be installed --> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.60-1.el7_5 for package: 1:mariadb-5.5.60-1.el7_5.x86_64 --> Running transaction check ---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be installed --> Finished Dependency Resolution Dependencies Resolved ============================================================================================================================================= Package Arch Version Repository Size ================================

Linux command: tail

tail - output the last part of files

Linux: Install testdisk

Install testdesk on Ubuntu sudo apt install testdisk sudo testdisk Install testdisk on Fedora Workstation [tuyen@g73jh ~]$ sudo dnf -y install testdisk [sudo] password for tuyen: Last metadata expiration check: 0:57:18 ago on Mon 07 Oct 2019 11:33:47 AM +07. Dependencies resolved. ================================================================================ Package Architecture Version Repository Size ================================================================================ Installing: testdisk x86_64 7.1-1.fc30 updates 444 k Installing dependencies: libewf x86_64 20140608-13.fc30 fedora 517 k Transaction Summary ================================================================================ Install 2 Packages Total download size: 961 k Installed size: 5.0 M Downloading Packages: (1/2): libewf-20140608-13.fc30.x86_64.rpm 285 kB/s | 517 k

Exchange Online Powershell

nginx on RHEL

Install nginx $ sudo yum install nginx Enable nginx service on boot $ sudo systemctl enable nginx Start nginx service $ sudo systemctl start nginx Check nginx service status $ sudo systemctl status nginx Check nginx version $ nginx -V Check configuration files $ sudo nginx -t Reload nginx service $ sudo nginx -s reload nginx Cheat Sheet sudo nginx -s reload sudo nginx -t sudo systemctl enable nginx : Enable nginx on start up sudo systemctl start nginx : Start nginx sudo systemctl reload nginx : Reload nginx systemctl status nginx : Check nginx status nginx in the news

Powershell: Check Bad Logon

get-aduser -Filter {BadLogonCount -ne 0} -properties * | select SamAccountName,BadLogonCount,BadPasswordTime,BadPwdCount,@{name='badPasswordTimeDT'; expression={[datetime]::fromFileTime($_.badPasswordTime)}} | sort BadPasswordTime | FT

Microsoft Windows: Software License Manager - slmgr

Open DOS Prompt or Powershell as Administrator, otherwise we get the following erof slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx

Linux Container LXD

Debian 9 on LXD lxc launch images:debian/stretch debian901 lxc exec debian901 -- /bin/bash cat /etc/*release PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" Install LXD on Fedora Workstation 32 $ sudo snap install lxd lxd 4.9 from Canonical✓ installed $ which lxd /var/lib/snapd/snap/bin/lxd $ lxd --version 4.9 Add alias to existing image $ lxc image ls +-------+--------------+--------+-----------------------------------------+--------+--------+-----------------------------+ | ALIAS | FINGERPRINT | PUBLIC | DESCRIPTION | ARCH | SIZE | UPLOAD DATE | +-------+--------------+--------+-----------------------------------------+--------+--------+------------------------

Office 365: Alert Policies - Creation of forwarding/redirect rule

The default Creation of forwarding/redirect rule alert policy will be triggered when end-users create rule to forward or redirect mail

GNU nano Text Editor

nano - Nano's ANOther editor, an enhanced free Pico clone

ManageEngine ServiceDesk Plus - Reset password

Let's reset the default administrator's password to 'admin'