misOrz

IT Tech & Life

Create VLANs in Linux

 

ip link add link eth0 name eth0.3001 type vlan id 3001

ip addr add 192.168.100.1/24 brd 192.168.100.255 dev eth0.3001

ip link set dev eth0.3001 up

ip -d addr show



Reference: https://www.baeldung.com/linux/vlans-create





Login as Root in Ubuntu GUI

GDM – GNOME Display Manager

/etc/pam.d/gdm-autologin

/etc/pam.d/gdm-password

註解掉 # auth required pam_succeed_if.so user != root quiet_success

sudo service gdm restart





How to connect hidden ssid on debian 11

root@LINUX:~# rfkill unblock wifi

root@LINUX:~# killall wpa_supplicant

root@LINUX:~# wpa_passphrase SSID-NAME Password > wpa.conf

root@LINUX:~# wpa_supplicant -i wlan0 -c wpa.conf -B

root@LINUX:~# dhclient wlan0





changed its 'Version' value from '11.5' to '11.8'

 N: Repository 'http://opensource.nchc.org.tw/debian bullseye InRelease' changed its 'Version' value from '11.5' to '11.8'


root@LINUX:~/tmp# apt-get update --allow-releaseinfo-change




Change root password using sed

1. Generate new root password & Su2Root

# openssl passwd -1 -salt root hello123

2. Replace first line in shadow file

# sed -i '1c root:$1$root$wrNKG1lgeNwlb0I1oJbR9/.:19613:0:99999:7:::' /etc/shadow





Using UserAccountControl Flags to Manipulate Properties (LDAP, AD)

 userAccountControl == 66048 (512+65536) 

 userAccountControl == 66050 Disabled, Don’t Expire Password

 userAccountControl == 514 (512+2) Account Disable





Reference: https://shellgeek.com/useraccountcontrol-flags-to-manipulate-properties/#UserAccountControl_66050_Disabled_and_Dont_Expire_Password


Web Server 憑證建立