Friday, May 8, 2020

Debian Buster: Preparing Debian for Video Call Meeting

Check internal or usb camera is working properly.

# dmesg | grep Video
[    0.504995] ACPI: Added _OSI(Linux-Dell-Video)
[    0.576610] pci 0000:00:01.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    2.702573] ACPI: Video Device [VGA] (multi-head: yes  rom: no  post: no)
[    2.703765] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:2e/LNXVIDEO:00/input/input6
[    2.703902] ACPI: Video Device [VGA1] (multi-head: yes  rom: no  post: no)
[    2.705790] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/LNXVIDEO:01/input/input7
[   27.192685] USB Video Class driver (1.1.1)

# ls /dev/ | grep video
video0
video1

Try your camera and microhpne using guvcview. Make a capture photo or make a simple video.
# apt-get install  guvcview  

Use your user account to run guvcview. The application will be at Multimedia -> gucvview.

Your photo and view will be save at home directory. Video by default will be save in mkv format file.

Now your ready to install other video meeting application for work from home or shool from home.

If you have trouble using internal on old Lenovo Laptop (such as Lenovo G40-45, Lenovo B475, etc) that running Windows 10 build 1903 or later, you can try linux live CD to use your internal camera
 
Tested on:
Debian 10.3 Linux 4.19.0-8-amd64
Laptop Asus K45DR

#TOGETHERFIGHTCOVID19
#WORKFROMHOME
#STUDYFROMHOME

Thursday, March 5, 2020

Berhati-hati bila menerima pesan untuk menjalankan MMI code

akhir2 ini banyak terjadi pengambil alihan nomor melalui kode MMI. hal ini karena pengguna memang tidak perlu menggunakan kode MMI untuk keperluan normal sehari-hari.

Apa itu MMI?
MMI = Man-Machine Interface
MMI ditandai oleh asterisk (*) atau hash (#)

MMI dibagi menjadi 2:
1. Supplementary Service (SS) codes
2. Unstructured Supplementary Service Data (USSD) codes

berikut ini USSD code yang digunakan oleh orang yang berniat jahat:
divert call kode **02, **004, **21, **61, **62, **67
forward sms: tergantung provider

divert call yang paling berhaya adalah **21, yang akan mendivert semua panggilan!
untuk mengujinya gunakan *#21#. bila ingin menghapusnya gunakan #21#.

pengguna akan dicharge untuk setiap sms
forward sms telkomsel *500*22#
forward sms xl *123*571#
forward sms indosat/ooredoo *123*600

sebenarnya hal ini berguna bagi yang menggunakan nomor telepon lebih dari 1 nomor.

Penting:
berhati-hati dalam menggunakan MMI. kecuali anda tahu apa yang anda lakukan.

https://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data
https://berlin.ccc.de/~tobias/mmi-ussd-ss-codes-explained.html
https://www.ma-no.org/en/security/unlock-hidden-smartphone-features-with-these-secret-codes
http://inspiratron.org/blog/2015/05/14/ussd-code-list-for-android-smartphone/
http://newbie-season.blogspot.com/2016/07/Cara-Mudah-Menyadap-SMS-Untuk-Semua-Operator-Tanpa-Aplikasi.html

Tuesday, November 19, 2019

Dokumen perpanjang STNK

Dokumen yang diperlukan untuk perpanjang STNK Samsat Jakarta:

  1. Ktp - asli
  2. Tanda lunas thn sebelum - asli
  3. Stnk - asli
  4. Cp ktp
  5. Cp stnk
  6. Cp bpkb
  7. Formulir yang telah diisi
Drive thru Samsat Jakarta:
  1. KTP asli
  2. STNK dan bukti bayar Asli
  3. BPKB asli
  4. Pemilik kendaraan
  5. Kendaraan
Perpanjangan STNK online install aplikasi SIGNAL–SAMSAT DIGITAL NASIONAL

Sunday, November 10, 2019

Debian Buster: install and configure phpmyadmin

Required Apache2, Mysql/MariaDB,  and PHP 7.x

There is no phpmyadmin package in Debian 10 Buster Repository. You need to install it manually.

  1. Create folder /usr/share/phpmyadmin/
  2. Download phpmyadmin from https://www.phpmyadmin.net/downloads/ and extract into  /usr/share/phpmyadmin/. Note: phpMyAdmin version 4.9.1.
  3. Create folder /etc/phpmyadmin/
  4. Create a new config file from configuration using file config.sample.inc.php
    # cp /usr/share/phpmyadmin/config.sample.inc.php /etc/phpmyadmin/config.inc.php
  5. Create folder /var/lib/phpmyadmin/tmp
    # mkdir /var/lib/phpmyadmin/tmp
  6. Edit /etc/phpmyadmin/config.inc.php
    $cfg['blowfish_secret'] = 'ABCDEabcde1234567890ABCDEfghij12'; // random 32 characters
    ...
    /**
     * Directories for saving/loading files from server
     */
    $cfg['UploadDir'] = '/var/lib/phpmyadmin/tmp';
    $cfg['SaveDir'] = '/var/lib/phpmyadmin/tmp';
  7. Create apache configuration file for phpmyadmin
    # touch /etc/apache2/conf-available/phpmyadmin.conf
  8. Edit /etc/apache2/conf-available/phpmyadmin.conf, copy paste these lines.
    Alias /phpmyadmin /usr/share/phpmyadmin

    <Directory /usr/share/phpmyadmin>
        Options SymLinksIfOwnerMatch
        DirectoryIndex index.php

        <IfModule mod_php5.c>
            <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
            </IfModule>
            <FilesMatch ".+\.php$">
                SetHandler application/x-httpd-php
            </FilesMatch>

            php_value include_path .
            php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
            php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
            php_admin_value mbstring.func_overload 0
        </IfModule>
        <IfModule mod_php.c>
            <IfModule mod_mime.c>
                AddType application/x-httpd-php .php
            </IfModule>
            <FilesMatch ".+\.php$">
                SetHandler application/x-httpd-php
            </FilesMatch>

            php_value include_path .
            php_admin_value upload_tmp_dir /var/lib/phpmyadmin/tmp
            php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-gettext/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/
            php_admin_value mbstring.func_overload 0
        </IfModule>

    </Directory>

    # Authorize for setup
    <Directory /usr/share/phpmyadmin/setup>
        <IfModule mod_authz_core.c>
            <IfModule mod_authn_file.c>
                AuthType Basic
                AuthName "phpMyAdmin Setup"
                AuthUserFile /etc/phpmyadmin/htpasswd.setup
            </IfModule>
            Require valid-user
        </IfModule>
    </Directory>

    # Disallow web access to directories that don't need it
    <Directory /usr/share/phpmyadmin/templates>
        Require all denied
    </Directory>
    <Directory /usr/share/phpmyadmin/libraries>
        Require all denied
    </Directory>
    <Directory /usr/share/phpmyadmin/setup/lib>
        Require all denied
    </Directory>
  9. Enabling your phpmyadmin config in apache2
    # a2enconf phpmyadmin
    Note to disable # a2disconf phpmyadmin
  10. Reload/restart your apache2
    # systemctl reload apache2

Remove folder /usr/share/phpmyadmin/test/ and /usr/share/phpmyadmin/setup/. You can access your phpmyadmin using http://localhost/phpmyadmin.

If your mysql root (with password) can not login with error:
mysqli_real_connect(): (HY000/1698): Access denied for user 'root'@'localhost', do these:

  1. using cli connect to mysql
    # mysql -u root -p
    Enter password:
  2. Select mysql database
     > use mysql;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Database changed
  3. Change root plugin from unix_socket to mysql_native_password
    > update user set plugin='mysql_native_password' where user='root';
    Query OK, 1 row affected (1.372 sec)
    Rows matched: 1  Changed: 1  Warnings: 0
  4. restart your mysql
    # systemctl restart mysql

If something goes wrong after you change unix_socket to mysql_native_password, revert it back.

Stop mysql server

# systemctl stop mysql

Start your mysql using mysqld_safe

# mysqld_safe --skip-grant-tables

In other terminal connect to mysql using root user

# mysql -u root
MariaDB [(none)]> user mysql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'user mysql' at line 1
MariaDB [(none)]> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [mysql]> update user set plugin='unix_socket' where user='root';
\q

Now, You may kill your terminal where mysqld_safe running and start your mysql service normally.

References:

  1. https://docs.phpmyadmin.net/en/latest/setup.html
  2. https://salsa.debian.org/phpmyadmin-team/phpmyadmin/blob/master/debian/README.Debian
  3. https://computingforgeeks.com/install-phpmyadmin-with-apache-on-debian-10-buster/
  4. https://docs.phpmyadmin.net/en/latest/config.html#config
  5. https://askubuntu.com/questions/998920/1698-access-denied-for-user-rootlocalhost-mysql-5-7-and-ubuntu-16-04

Friday, September 20, 2019

Update date time using batch file

For dual OS, sometimes windows show date incorrect. You need to go setting and force windows to synchronize its date time.
The easy way and fast is using batch files. Using text editor, create batch files for example datesync.bat in your desktop. Write or copy/paste this code:

Echo off
Echo Starting Windows Time Service
net start w32time


Echo Syncronizing Date Time
w32tm /resync
pause

Everytime your date show incorrect, run this script as administrator. It will start windows time service (should not be disable on services.msc) and syncronize date time from internet.