Learn about Centmin Mod LEMP Stack today
Become a Member

[Solved] FTP password ask for confirmation and don't wait for it

Discussion in 'Bug Reports' started by elargento, Apr 7, 2017.

  1. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    9:58 PM
    10
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit ?
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.10
    • When was last time updated Centmin Mod code base ? : Never yet. It's a fresh install
    I was setting up a new domain, centminmod asked for an FTP username and a password. I entered the password once, then it asked to confirm the password and while I was typing the script continued the execution:
    Code:
    Create FTP username for vhost domain (enter username): quieromipeliculahd
    Auto generate FTP password (recommended) [y/n]: n
    Create FTP password for quieromipeliculahd (enter password): fakepas123
    
    FTP username you entered: quieromipeliculahd
    FTP password you entered: fakepas123
    
    Password:
    Enter it again:
    -------------------------------------------------------------
    fakegenerated nginx include file [initial]: /usr/local/nginx/conf/autoprotect/demodomain.com/autoprotect-demodomain.com.conf
    generated nginx include file [initial]: /usr/local/nginx/conf/autoprotect/quieromipeliculahd.com/autoprotect-quieromipeliculahd.com.conf
    
    autoprotect.sh run completed...
    
    There is no way it could have been detected the password for the 2nd time since I just typed "fake" and didn't receive any error saying the password wasn't the same as the first one.
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    what ssh client/app you using to ssh into your server ?
     
  3. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    9:58 PM
    10
    Putty
     
  4. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    strange there's no way for me to reproduce this on my end as it always works for me.

    Troubleshooting Centmin Mod Menu Option 22 Wordpress Install Run



    To troubleshoot centmin.sh menu option 22 wordpress installation, you need to check the centmin.sh menu option 22 log located in /root/centminlogs at /root/centminlogs/centminmod_*_wordpress_addvhost.log based log where * is the centminmod version and date timestamp. Edit and mask any actual ftp username/password or wordpress usernames and logins before posting the log contents to Pastebin.com or Gists to share a sanitised version of the contents of the log.

    Example list /root/centminlogs files in date ascending order and grep for wordpress_addvhost.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep wordpress_addvhost.log
    

    example output returns log at /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_wordpress_addvhost.log
    Code (Text):
    ls -lahrt /root/centminlogs | grep wordpress_addvhost.log
    -rw-r--r--  1 root root 2.2M Oct 11 01:40 /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_wordpress_addvhost.log
    

    in SSH use cat to ouput contents of /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_wordpress_addvhost.log. Clear your SSH client window/buffer so only output is the contents of the file
    Code (Text):
    cat /root/centminlogs/centminmod_1.2.3-eva2000.09.001_111016-112321_wordpress_addvhost.log
    

    Then copy and paste into Pastebin.com or Gists entry. If your SSH window scroll buffer isn't that large to get the whole contents of the install log, you can download file manually and copy and paste contents. But makes sure it's sanitised version of the contents without revealing sensitive info. For example you can replace domain name of the wordpress site with generic dummy entry = domain.com if you want and mask site/server IP revealed in the log with generic dummy entry = 111.222.333.444.
     
  5. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    9:58 PM
    10
    I format the server but was able to reproduce it again :)

    I attach the logs since there is no need to hide the data, it was just for testing purposes and won't have the same passwords and FTP user.

    [Bash] [1;32;40m------------------------------------------------------------ (B[m[ - Pastebin.com

    Code:
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mInstalling wpcli.sh
    (B[m[1;32;40m------------------------------------------------------------
    (B[minstalling...
    
    Error: /usr/bin/wp not found !!! Downloading now......
    2017-04-08 19:33:46 URL:https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar [5235728/5235728] -> "/usr/bin/wp" [1]
    Download done.
    
    Error: /root/wpcli/wp-completion.bash not found !!! Downloading now......
    2017-04-08 19:33:46 URL:https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash [495/495] -> "/root/wpcli/wp-completion.bash" [1]
    Download done.
    
    
    -------------------------------------------------------------
    PHP binary:    /usr/local/bin/php
    PHP version:    5.6.30
    php.ini used:    /usr/local/lib/php.ini
    WP-CLI root dir:    phar://wp-cli.phar
    WP-CLI packages dir:  
    WP-CLI global config:  
    WP-CLI project config:  
    WP-CLI version:    1.1.0
    -------------------------------------------------------------
    
    -------------------------------------------------------------
    wp-cli install completed
    Read http://wp-cli.org/ for full usage info
    
    -------------------------------------------------------------
    Please log out of SSH session and log back in
    You can then call wp-cli via command: wp
    i.e. wp --info --allow-root
    -------------------------------------------------------------
    
    [1;33;40m-------------------------------------------------------------
    (B[m[1;32;40mSetup full Nginx vhost + Wordpress + WP Plugins
    (B[m[1;33;40m-------------------------------------------------------------
    (B[m
    Enter vhost domain name you want to add (without www. prefix): quieromipeliculah
    d.com
    
    Create a self-signed SSL certificate Nginx vhost? [y/n]: n
    Theme Setup:
    Install CyberChimps Responsive Theme (cyberchimps.com/responsive-theme/) [y/n]:
    y
    
    Wordpress Setup:
    Set custom WP Admin Display Name ? [y/n]: y
    Enter Custom WP Admin Display Name: admin
    Install Wordpress in subdirectory /blog ? [y/n]: n
    Disable Auto Generated WP Admin Username / Password ? [y/n]: n
    Disable wp-login.php password protection ? (less security) [y/n]: y
    Enter email address for Admin User for Wordpress Installation: lu9fcb@gmail.com
    
    [1;33;40mDefault is to install KeyCDN WP Cache Enabler Plugin
    (B[m[1;33;40mas it's more stable and reliable than WP Super Cache.
    (B[m[1;33;40mRedis cache may have issues with caching due to long 6hr cache TTL
    (B[m[1;33;40mYou can select which caching method to use below:
    (B[m
    [1;33;40m--------------------------------------------------------
    (B[m[1;32;40m        Wordpress Caching              
    (B[m[1;33;40m--------------------------------------------------------
    (B[m[1;32;40m1). KeyCDN Cache Enabler (default & recommended)
    (B[m[1;32;40m2). Redis Nginx Level Caching (may have issues with some wp plugins)
    (B[m[1;32;40m3). Wordpress Super Cache
    (B[m[1;33;40m--------------------------------------------------------
    (B[mEnter option [ 1 - 3 ] 1
    
    Create FTP username for vhost domain (enter username): quieromipeliculahd
    Do you want to auto generate FTP password (recommended) [y/n]: n
    Create FTP password for quieromipeliculahd (enter password): corintios999
    
    FTP username you entered: quieromipeliculahd
    FTP password you entered: corintios999
    
    Password:
    Enter it again:
    
    include file /usr/local/nginx/conf/wpcacheenabler_map.conf add to nginx.conf
    
    include file /usr/local/nginx/conf/redisupstream.conf add to nginx.conf
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mSetup Wordpress + Cache Enabler for quieromipeliculahd.com
    (B[m[1;32;40m------------------------------------------------------------
    (B[m
    Using full static page caching may cause problems for mobile & tablet device
    visitors depending on your WP themes used so you may want to exclude those
    
    Do you want to exclude mobile/tablet devices from Cache Enabler caching ? [y/n]:
     y
    Downloading WordPress 4.7.3 (en_US)...
    md5 hash verified: 044729d30b720809f19e14ece49e119b
    Success: WordPress downloaded.
    Success: Generated 'wp-config.php' file.
    11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    #*/15 * * * * sleep 168s ; wget -O - -q -t 1 http://quieromipeliculahd.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    Success: WordPress installed successfully.
    Success: Updated user 312551.
    Success: Rewrite rules flushed.
    Success: Rewrite structure set.
    [1;32;40m------------------------------------------------------------
    (B[mInstalling Responsive (2.4)
    Downloading install package from https://downloads.wordpress.org/theme/responsive.2.4.zip...
    Unpacking the package...
    Installing the theme...
    Theme installed successfully.
    Activating 'responsive'...
    Success: Switched to 'Responsive' theme.
    Success: Installed 1 of 1 themes.
    [1;32;40m------------------------------------------------------------
    (B[m[1;32;40m------------------------------------------------------------
    (B[mInstalling Cache Enabler – WordPress Cache (1.2.0)
    Downloading install package from https://downloads.wordpress.org/plugin/cache-enabler.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'cache-enabler'...
    Plugin 'cache-enabler' activated.
    Success: Installed 1 of 1 plugins.
    [1;32;40m------------------------------------------------------------
    (B[mInstalling Optimus – WordPress Image Optimizer (1.4.8)
    Downloading install package from https://downloads.wordpress.org/plugin/optimus.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'optimus'...
    Plugin 'optimus' activated.
    Success: Installed 1 of 1 plugins.
    [1;32;40m------------------------------------------------------------
    (B[m[1;32;40m------------------------------------------------------------
    (B[mInstalling Sucuri Security – Auditing, Malware Scanner and Security Hardening (1.8.3)
    Downloading install package from https://downloads.wordpress.org/plugin/sucuri-scanner.1.8.3.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'sucuri-scanner'...
    Plugin 'sucuri-scanner' activated.
    Success: Installed 1 of 1 plugins.
    [1;32;40m------------------------------------------------------------
    (B[mInstalling Disable XML-RPC (1.0.1)
    Downloading install package from https://downloads.wordpress.org/plugin/disable-xml-rpc.1.0.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'disable-xml-rpc'...
    Plugin 'disable-xml-rpc' activated.
    Success: Installed 1 of 1 plugins.
    [1;32;40m------------------------------------------------------------
    (B[mInstalling CDN Enabler – WordPress CDN Plugin (1.0.4)
    Downloading install package from https://downloads.wordpress.org/plugin/cdn-enabler.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'cdn-enabler'...
    Plugin 'cdn-enabler' activated.
    Success: Installed 1 of 1 plugins.
    [1;32;40m------------------------------------------------------------
    (B[mUninstalled and deleted 'hello' plugin.
    Success: Uninstalled 1 of 1 plugins.
    Success: Plugin already updated.
    
    6 installed plugins:
      I akismet         3.3
      A cache-enabler   1.2.0
      A cdn-enabler     1.0.4
      A disable-xml-rpc 1.0.1
      A optimus         1.4.8
      A sucuri-scanner  1.8.3
    
    Legend: I = Inactive, A = Active
    [1;32;40m------------------------------------------------------------
    (B[m11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    #*/15 * * * * sleep 168s ; wget -O - -q -t 1 http://quieromipeliculahd.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    16 23 * * * echo quieromipeliculahd.com cacheenabler cron; sleep 198s ; rm -rf /home/nginx/domains/quieromipeliculahd.com/public/wp-content/cache/cache-enabler/* > /dev/null 2>&1
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mCreated uninstall script
    (B[m[1;33;40m/root/tools/wp_uninstall_quieromipeliculahd.com.sh
    (B[m[1;32;40m------------------------------------------------------------
    (B[m[1;32;40m------------------------------------------------------------
    (B[m[1;33;40mCreated wp_updater_quieromipeliculahd.com.sh script
    (B[m[1;33;40m/root/tools/wp_updater_quieromipeliculahd.com.sh
    (B[m[1;32;40m------------------------------------------------------------
    (B[m11 */23 * * * /usr/local/src/centminmod/tools/autoprotect.sh 2>/dev/null
    0 */4 * * * /usr/bin/cminfo_updater 2>/dev/null
    #*/15 * * * * sleep 168s ; wget -O - -q -t 1 http://quieromipeliculahd.com/wp-cron.php?doing_wp_cron=1 > /dev/null 2>&1
    16 23 * * * echo quieromipeliculahd.com cacheenabler cron; sleep 198s ; rm -rf /home/nginx/domains/quieromipeliculahd.com/public/wp-content/cache/cache-enabler/* > /dev/null 2>&1
    0 */8 * * * sleep 278s ;/root/tools/wp_updater_quieromipeliculahd.com.sh >/dev/null 2>&1
    
    [1;33;40m-------------------------------------------------------------
    (B[mgenerated nginx include file [same]: /usr/local/nginx/conf/autoprotect/demodomain.com/autoprotect-demodomain.com.conf
    generated nginx include file [initial]: /usr/local/nginx/conf/autoprotect/quieromipeliculahd.com/autoprotect-quieromipeliculahd.com.conf
    
    autoprotect.sh run completed skipped nginx restart...
    
    Restarting nginx (via systemctl):  [  OK  ]
    service nginx reload
    Reloading nginx configuration (via systemctl):  [  OK  ]
    service php-fpm restart
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    systemctl restart pure-ftpd.service
    
    [1;33;40m-------------------------------------------------------------
    (B[m[1;37;40mFTP hostname : 158.69.215.142
    (B[m[1;37;40mFTP port : 21
    (B[m[1;37;40mFTP mode : FTP (explicit SSL)
    (B[m[1;37;40mFTP Passive (PASV) : ensure is checked/enabled
    (B[m[1;37;40mFTP username created for quieromipeliculahd.com : quieromipeliculahd
    (B[m[1;37;40mFTP password created for quieromipeliculahd.com : corintios999
    (B[m[1;33;40m-------------------------------------------------------------
    (B[m[1;37;40mvhost for quieromipeliculahd.com created successfully
    (B[m
    [1;33;40mdomain: http://quieromipeliculahd.com
    (B[m[1;37;40mvhost conf file for quieromipeliculahd.com created: /usr/local/nginx/conf/conf.d/quieromipeliculahd.com.conf
    (B[m
    [1;37;40mupload files to /home/nginx/domains/quieromipeliculahd.com/public
    (B[m[1;37;40mvhost log files directory is /home/nginx/domains/quieromipeliculahd.com/log
    (B[m
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mSSH commands to uninstall created Wordpress install and Nginx vhost:
    (B[m[1;33;40m  /root/tools/wp_uninstall_quieromipeliculahd.com.sh
    (B[m[1;32;40m------------------------------------------------------------
    (B[m
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mWordpress Auto Updater created at:
    (B[m[1;33;40m  /root/tools/wp_updater_quieromipeliculahd.com.sh
    (B[m[1;33;40mcronjob set for every 8 hours update (3x times per day)
    (B[m[1;32;40m------------------------------------------------------------
    (B[m
    [1;33;40mWordpress domain: quieromipeliculahd.com
    (B[m[1;33;40mWordpress DB Name: wp53354900db_11943
    (B[m[1;33;40mWordpress DB User: wpdb11943u22770
    (B[m[1;33;40mWordpress DB Pass: wpdboyfrc7LFVCYRp3381
    (B[m[1;33;40mWordpress Admin User ID: 312551
    (B[m[1;33;40mWordpress Admin User: zcQ9A10mTmJBwaHg6Yywp8411
    (B[m[1;33;40mWordpress Admin Pass: zyWoXVrGXoRwps8345
    (B[m[1;33;40mWordpress Admin Email: lu9fcb@gmail.com
    (B[m[1;33;40mWordpress Admin Display Name: admin
    (B[mRestarting nginx (via systemctl):  [  OK  ]
    Gracefully shutting down php-fpm . done
    Starting php-fpm  done
    
    [1;33;40m-------------------------------------------------------------
    (B[m[1;37;40mCurrent vhost listing at: /usr/local/nginx/conf/conf.d/
    (B[m
                         
    Apr 7   23:59   846    ssl.conf
    Apr 7   23:59   1.1K   demodomain.com.conf
    Apr 8   00:09   1.6K   virtual.conf
    Apr 8   19:36   3.5K   quieromipeliculahd.com.conf
    
    [1;32;40m------------------------------------------------------------
    (B[m[1;33;40mTo complete setup:
    (B[m  1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/
      2. Settings Menu > Cache Enabler set options and hit Save Changes
      3. Settings Menu > Optimus set options and hit Save Changes
      4. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides Wordpress front page option
    (B[m[1;32;40m------------------------------------------------------------
    (B[m
    [1;33;40m-------------------------------------------------------------
    (B[m[1;37;40mvhost for quieromipeliculahd.com wordpress setup successfully
    (B[m[1;37;40mquieromipeliculahd.com setup info log saved at:
    (B[m[1;37;40m/root/centminlogs/centminmod_1.2.3-eva2000.09.004_080417-192717_wordpress_addvhost.log
    (B[m[1;33;40m-------------------------------------------------------------
    (B[m
    
     
    Last edited: Apr 9, 2017
  6. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    what was the actual password used ?
     
  7. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    9:58 PM
    10
    corintios999 for the FTP

    You'll notice in the logs there isn't any password confirm since the script continue the installation without confirming the password.
     
  8. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    that prompt comes from password checker (cracklib-check command) itself and not my actual routine's code

    Thought it return okay for me
    Code (Text):
    ftppass=corintios999
    cracklib-check <<<"$ftppass"
    corintios999: OK
    


    i.e.
    Code (Text):
    ftppass=pass
    cracklib-check <<<"$ftppass"                
    pass: it is too short
    


    Is your local PC's language non-English based as it could be a locale issue
     
  9. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    oh i see where it is - it's pure-pw command to add and create virtual ftp user
    Code (Text):
    ( echo "${ftppass}" ; echo "${ftppass}" ) | pure-pw useradd "$ftpuser" -u $PUREUSER -g $PUREGROUP -d "/home/nginx/domains/$vhostname"
    

    it auto enters and re-enters your desired ftppass defined variable password for you again so you don't actually do it, hence why it continues on without your intervention and is normal
     
  10. elargento

    elargento Member

    293
    16
    18
    Jan 4, 2016
    Ratings:
    +39
    Local Time:
    9:58 PM
    10
    why it ask to confirm the password so? :cautious:
     
  11. eva2000

    eva2000 Administrator Staff Member

    30,170
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,138
    Local Time:
    10:58 AM
    Nginx 1.13.x
    MariaDB 5.5
    that's normal when you run pure-pw useradd command it asks you to enter password again.. what centmin mod does is auto enter the password you defined again for you so you don't have to.
     
    • Like Like x 1