Welcome to Centmin Mod Community
Become a Member

htpasswd not generate new content

Discussion in 'Bug Reports' started by hardousse, Apr 17, 2017.

Tags:
  1. hardousse

    hardousse Member

    82
    23
    8
    Dec 15, 2015
    Sweden
    Ratings:
    +35
    Local Time:
    2:28 AM
    1.11.*
    10.1*
    • CentOS Version:CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.11.13
    • PHP Version Installed: 7.0.14
    • MariaDB MySQL Version Installed:10.1.21
    • When was last time updated Centmin Mod code base ? run centmin.sh menu option 23 submenu option 2
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:

      Post output in CODE tags.
      Code:
      NGINX_PAGESPEED=y
      NGINX_ZLIBCUSTOM='y'
      ORESTY_LUANGINX=n
      NGINX_XSLT='n'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_XSLT='n'
      NGXDYNAMIC_IMAGEFILTER='y'
      NGXDYNAMIC_GEOIP='y'
      NGXDYNAMIC_STREAM='y'
      NGXDYNAMIC_HEADERSMORE='y'
      NGXDYNAMIC_SETMISC='y'
      NGXDYNAMIC_ECHO='y'
      NGXDYNAMIC_SRCCACHE='y'
      NGXDYNAMIC_MEMC='y'
      NGXDYNAMIC_REDISTWO='y'
      NGXDYNAMIC_NGXPAGESPEED='y'
      NGXDYNAMIC_BROTLI='y'
      PHPMSSQL='y'
      PHP_PGO='y'
      PHP_PGO_CENTOSSIX='y'
      NGINX_DEVTOOLSETGCC='y'
      GENERAL_DEVTOOLSETGCC='y'
      CLANG='n'
      LIBRESSL_SWITCH='n'
      NGX_GSPLITDWARF='y'
      PHP_GSPLITDWARF='y'
      NGX_LDGOLD='y'
    i want reset password nginx login to use my own username and password but when i use the command :
    Code:
    Resetting wp-login.php protection:
    Step 1. remove protection file at /home/nginx/domains/domain.com/htpasswd_wplogin
         rm -rf /home/nginx/domains/domain.com/htpasswd_wplogin
    Step 2. run command:
         /usr/local/nginx/conf/htpasswd.sh create /home/nginx/domains/domain.com/htpasswd_wplogin YOURUSERNAME YOURPASSWORD
    Step 3. restart Nginx + PHP-FPM services
         nprestart
    its not working and i get empty htpasswd_wplogin,i donwt know why?
     
  2. eva2000

    eva2000 Administrator Staff Member

    29,743
    6,719
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,031
    Local Time:
    9:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    try running debug mod for bash -x with dummy username/password
    Code (Text):
    bash -x /usr/local/nginx/conf/htpasswd.sh create /home/nginx/domains/domain.com/htpasswd_wplogin YOURUSERNAME YOURPASSWORD

    copy and paste output for command and paste to pastebin.com or gist.github.com
     
  3. hardousse

    hardousse Member

    82
    23
    8
    Dec 15, 2015
    Sweden
    Ratings:
    +35
    Local Time:
    2:28 AM
    1.11.*
    10.1*
    this output
    Code:
    # bash -x /usr/local/nginx/conf/htpasswd.sh create /home/nginx/domains/domain.com/htpasswd_wplogin userusername #user#2017#
    ++ date +%d%m%y-%H%M%S
    + DT=160417-185742
    + file=/home/nginx/domains/domain.com/htpasswd_wplogin
    + user=userusername
    + pass=
    + case "$1" in
    + touch /home/nginx/domains/domain.com/htpasswd_wplogin
    + genpassc
    + [[ -f /home/nginx/domains/domain.com/htpasswd_wplogin ]]
    + [[ -n userusername ]]
    + [[ -n '' ]]
     
  4. hardousse

    hardousse Member

    82
    23
    8
    Dec 15, 2015
    Sweden
    Ratings:
    +35
    Local Time:
    2:28 AM
    1.11.*
    10.1*
    @eva2000 thank for help i found the problem its long of password when i make more them 12 its working so better use minimum 12 for username and password.
    thank you
     
  5. eva2000

    eva2000 Administrator Staff Member

    29,743
    6,719
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,031
    Local Time:
    9:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    actually it's the # hashes in password = blank file

    without hashes
    Code (Text):
    /usr/local/nginx/conf/htpasswd.sh create htpasswd_wplogin userusername 12345678910111213
    
    htpasswd_wplogin contents:
    userusername:$apr1$DBVQiNRB$FI.RqXHRZDGspdJuPehY0.
    


    edit: it's the first hash in password, remove first hash and it's ok
     
  6. hardousse

    hardousse Member

    82
    23
    8
    Dec 15, 2015
    Sweden
    Ratings:
    +35
    Local Time:
    2:28 AM
    1.11.*
    10.1*
    get it :) thank you
     
  7. eva2000

    eva2000 Administrator Staff Member

    29,743
    6,719
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,031
    Local Time:
    9:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    it's the first hash in password, remove first hash and it's ok

    Code (Text):
    bash -x /usr/local/nginx/conf/htpasswd.sh create htpasswd_wplogin userusername user#2017#
    ++ date +%d%m%y-%H%M%S
    + DT=160417-192735
    + file=htpasswd_wplogin
    + user=userusername
    + pass=user#2017#
    + case "$1" in
    + touch htpasswd_wplogin
    + genpassc
    + [[ -f htpasswd_wplogin ]]
    + [[ -n userusername ]]
    + [[ -n user#2017# ]]
    ++ openssl passwd -apr1 user#2017#
    + printf 'userusername:$apr1$OOdUeTB3$GKjFExyTSLFKZV67yGh7A.\n'
    + echo ''
    
    + echo 'htpasswd_wplogin contents:'
    htpasswd_wplogin contents:
    + cat htpasswd_wplogin
    userusername:$apr1$OOdUeTB3$GKjFExyTSLFKZV67yGh7A.
     
    • Informative Informative x 1