JWK - Jackall's IT Wiki

Sécurité, Système, Réseau

User Tools

Site Tools


Tips and tricks

You'll find here various tips and tricks on Networks, GNU/Linux and security


Test HTTPS website through CLI

openssl s_client -connect www.somesite:443

Bypass root password on GNU/Linux

  • In GRUB, pass the following parameter :
  • In the shell
mount -o remount,rw /

This will remount the root partition in read write mode

  • Change root password
  • Synchronise the disk
  • Logout. The kernel Panic is normal.
  • Reboot

HTTP authentication through CLI

  • Use the following commands
 GET / HTTP/1.1
 Host: host.domain.tld
 Authorization: BASIC //base 64 password//
  • To generate the base 64 password :
php -r "echo base64_encode('login:pass') ."n";"

Serial connection (COM Port) under GNU/linux

First you will have to install the GNU/Screen The find out the virtual device to use :

 #dmesg | egrep --color 'serial|ttyS'
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A

Then, just launch screen with the following command

 # screen /dev/ttyXXX BaudRate [option]


screen /dev/ttyS0 19200,cs8

Changing keyboard language

  • Text Mode
 #loadkeys fr
  • Under X
 #setxkbmap fr 


  • Just for the current session
 setenforce 0
  • For good
 setenforce 0

Then edit :


Change your MAC address on GNU/Linux

ifconfig eth1 down
ifconfig eth1 hw ether AA:BB:CC:11:22:33
ifconfig eth1 up

Empty Linux last log file

cp -p /var/log/wtmp  /var/backup/
> /var/log/wtmp 

Delete user's password on GNU/Linux

This allow you to disable a user's password without disabling the account. The user wont be able to login.

passwd -d username


en/tips.txt · Last modified: 2018/02/18 16:01 (external edit)