Welcome to Centmin Mod Community
Become a Member

Sysadmin Role of QR Codes In Centmin Mod ?

Discussion in 'System Administration' started by eva2000, Aug 4, 2019.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    44,417
    10,144
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,692
    Local Time:
    4:39 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Curious how many folks here use QR Codes in some form or another ? Recently I have been playing with Wireguard VPN and it supports creating client VPN configuration profiles generated as QR Codes and you can then use Wireguard Android app to scan the QR Code and import the client VPN configuration profile into Wireguard Android app ! I love this feature !

    So was thinking how I can utilise QR Codes in Centmin Mod to quickly transfer Centmin Mod info from SSH session output to QR Codes which your mobile or desktop computers can scan the QR Codes to transfer the info easily. Would be fairly noob proof to get folks to scan a QR Code versus running SSH commands to inspect log files for Centmin Mod information/login details and/or download via SFTP/FTP logs and then inspect those logs etc.

    Though thee's a 3KB size limit for data converted.

    Example on CentOS install qrencode YUM package and then pipe in text to qrencode to generate the QR Code
    Code (Text):
    yum -y install qrencode
    echo https://centminmod.com | \qrencode -t ansiutf8
    

    another example login.txt text file containing
    Code (Text):
    Username: user
    Password: pass
    Email: email@domain.com
    

    Code (Text):
    cat login.txt | \qrencode -t ansiutf8


    scanning the resulting QR Code in QRDroid
    Screenshot_2019-08-04-14-12-28-951_la.droid.qr~01.png

    or piping nginx -V config output to a png file
    has 2035 characters in output
    Code (Text):
    nginx -V 2>&1 | wc -c
    2035
    

    Code (Text):
    nginx -V 2>&1 | \qrencode -o nginx-ver-01.png -t png -v13 -s2 -m3
     

    Attached Files:

    Last edited: Aug 5, 2019
  2. eva2000

    eva2000 Administrator Staff Member

    44,417
    10,144
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +15,692
    Local Time:
    4:39 AM
    Nginx 1.17.x
    MariaDB 5.5/10.x
    Updated centmin.sh menu option 22 in 123.09beta01 so that wordpress installer can optionally generate QR Codes for wordpress login details, nginx pure-ftpd ftp login details and optionally for wp-login.php HTTP password protection login details so you can scan the QR Codes to get the info onto your mobile, laptop/desktop easily. QR Code generation is disabled by default unless you set QRCODE='y' in your persistent config file /etc/centminmod/custom_config.inc prior to running centmin.sh menu option 22.

    Examples below

    [​IMG]
    [​IMG]
    [​IMG]