Jump to content

Pysis

Members
  • Posts

    42
  • Joined

  • Last visited

  • Days Won

    1
  • Donations

    0.00 GBP 

Wiki Article Comments posted by Pysis

  1. I was helping with `realmd` account creation today, and wanted to add some of my own documentation from the personal exchange to further help the public with technical literacy for this topic.

    https://www.getmangos.eu/wiki/referenceinfo/otherfiles/managing-user-accounts-using-3rd-party-apps-r20088/

    This page actually provides this more generic information well, but wanted to link that to here for that reason, and also in case I can add anything more useful too.

    My statements are not producing the same value, but this is the clarified process, with differing examples.

    Remember to replace `username` and `password` with your intended, respective values, and your resulting SHA1 hash will most likely be different than my `5b...78` hash.  For the shell command examples, I provide alternatives that request user input to compete, to make this more obvious.


    Using the MariaDB included, or associated, GUI application client, HeidiSQL:

    https://www.heidisql.com/help.php#queries

    I use DBeaver, but have also used MySQL Workbench in the past, along with SequelPro for Apple computers, and Navicat even longer ago.


    The base SQL, mentioned above, that I also wanted to represent a bit differently:

    `SELECT SHA1(CONCAT(UPPER('username'), ':', UPPER('password')));`


    Fish shell command line statements:
    ```
    ⋊> echo -n 'SELECT SHA1(CONCAT(UPPER(\'username\'), \':\', UPPER(\'password\')));' | mariadb -s -p"$dbRootPP";
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n 'SELECT SHA1(\''(read -P 'Username: '| upcase)':'(read -P 'Password: '| upcase)'\');' | mariadb -s -p"$dbRootPP";
    Username: username
    Password: password
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n 'USERNAME:PASSWORD' | sha1sum | cut -d' ' -f1
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n (read -P 'Username: '| upcase)':'(read -P 'Password: '| upcase) | sha1sum | cut -d' ' -f1
    Username: username
    Password: password
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n 'USERNAME:PASSWORD' | openssl sha1 | cut -d' ' -f2
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n (read -P 'Username: '| upcase)':'(read -P 'Password: '| upcase) | openssl sha1 | cut -d' ' -f2
    Username: username
    Password: password
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n 'USERNAME:PASSWORD' | /usr/bin/openssl sha1 | cut -d' ' -f2
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ⋊> echo -n (read -P 'Username: '| upcase)':'(read -P 'Password: '| upcase) | /usr/bin/openssl sha1 | cut -d' ' -f2
    Username: username
    Password: password
    5b039d152722e351c8bdebcf06fd8cd4e5244d78

    ```


    My environment:
    ```
    ⋊> neofetch --stdout distro kernel shell term
    distro: Fedora release 39 (Thirty Nine) x86_64
    kernel: 6.6.13-200.fc39.x86_64
    shell: fish 3.7.0
    term: gnome-terminal

    ⋊> mariadb --version
    mysql  Ver 15.1 Distrib 10.1.21-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

    ⋊> sha1sum --version
    sha1sum (GNU coreutils) 9.3
    Copyright (C) 2023 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Written by Ulrich Drepper, Scott Miller, and David Madore.

    ⋊> openssl version
    OpenSSL 1.1.1b  26 Feb 2019

    ⋊> /usr/bin/openssl version
    OpenSSL 3.1.1 30 May 2023 (Library: OpenSSL 3.1.1 30 May 2023)
    ```


    The only remaining problem was that the new account, or at some point, any account, were all receiving messages that they were banned, or the account closed, and could basically not login using the WoW client.
    Changing `LogLevel` to '2' in `realmd.conf` helped show us a message about an AuthChallenge code module reporting "Banned IP ...".

    https://github.com/search?q=repo%3Amangos%2Frealmd banned&type=code
    https://github.com/mangos/realmd/blob/8c08d47a9a3e6c64007be67074e7c587a5e63e5e/Auth/AuthSocket.cpp#L375

    This could be answered in another article, and I may have seem some posts mentioning various strategies, but I want to briefly list the possible solutions for these other problems here, since they are at least close in function and process.

    What may have fixed this these problems, while even using the localhost IP address 127.0.0.1 in the `realmd.conf` file, is restarting the realmd process.

    https://www.getmangos.eu/forums/topic/10721-says-my-account-is-closed/#comment-79515
    https://www.getmangos.eu/forums/topic/10690-stuck-on-connected/#comment-79328

    For specific account problems, try using the same localhost IP address as the `localAddress`, but changing the `address` field to the external IP address of the machine the server is being hosted on.  An alternative is deleting the `address` field record's data.

    We also checked reduced `failedLogins` to '0', any `active` field to '1', or `locked` to '0', and checking there was no matching record for either IP address in the `ip_banned` table, or even that it was empty.

    Also, for any solution in this post, make sure all database changes are saved/persisted, so you can reload and find the data you updated again, which is more applicable when using GUI application clients to interact with a database, but also any command line execution in case errors are reported there too.

     

  2. Using a client on the command line is always possible, and may even support login path like MySQL does.  If you want a GUI like MySQL Workbench though, that may still work and just mention a warning every time, or Maria includes HeidiSQL automatically.

  3. Sample CMake/Generate command:

    Quote

    cmake "$rootDir/$coreName/server" -DCMAKE_INSTALL_PREFIX="$rootDir/$coreName_install" -B "$rootDir/$coreName_build" -G "Visual Studio 16" -A x64;

    Sample, optional, non-string CMake parameters:

    Quote

    -DSCRIPT_LIB_ELUNA:BOOL=1 -DSCRIPT_LIB_SD3:BOOL=1

    Sample VS build command:

    Quote

    MSBuild "$rootDir/$coreName/server_build/MaNGOS.sln";

     

  4. Since updates, my other comments here, and my own recent success, I should report that Visual Studio 2019 Community Edition, version 16.9.2, EasyBuild version 2.2.6, and CMake version 3.18, all on Windows 10 Pro 64-bit, I was able to build a MaNGOS core successfully, thanks to the great work of others!

    The VS minor and patch versions were both very important to keep updated throughout, but may hopefully be less important now.

    • Like 1
  5. For using MySQL 8.0, all I had to do so far was update the password scheme for the database connection user(s).  Working so far with minimal testing, you just need to run this SQL:

    Quote

    ALTER USER '<username>'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';

    The default was the caching_sha2_password scheme.

    Update: After practicing the process again recently, and wanting to retain higher security, I found you can still use MySQL 8 as the database server with the newer secure default password method, but requires retrieving a dll from a MariaDB installation/package: https://stackoverflow.com/questions/49963383/authentication-plugin-caching-sha2-password#comment116030255_51532833
    "MariaDB\lib\plugin\caching_sha2_password.dll"

    Of course, there may still be issues using MySQL 8 with MaNGOS as Antz stated at the top of the article.  I just wanted to continue collecting pieces of information relating to this somewhere, as I have not found an item to track them all yet.

    More notes are the following:

    • I saw in another guide that since MySQL 8.0.28, TLSv1 support was removed, so MaNGOS may no longer be able to connect to the database server at all.
    • Antz has also stated that MariaDB support seems better, a comment stating the move with elation implying general success, possibly avoiding sql_mode / strict mode troubles with zero dates, even when only specified as a predicate in the WHERE clause.  I have made a change to demonstrate this can be avoided, but is not ideal, and think the coding style for SQL database updates, and game data representation, could probably be changed instead to promote modern conformance.  There could be other issues though, and MariaDB support seems easier so far.
  6. Those minor revisions are just patch releases to fix bugs or security issues, use the latest.

    AntzToday at 6:02 AM

    @Whyarp 5.7 is the ideal version, but we have done a lot of work recently to support 8.0 (not 100% tested though)
     
     
    [6:03 AM]
    of the 5.7.x versions, just grab the latest(edited)
     
     
    dd4dbc0016779df1378e7812eabaa04d.png

    Ryan WadeToday at 6:03 AM

    Thank you Antz, much appreciated!
     
     
    53d755e86d43358936c1c7c824bd7ddc.webp?si

    Elmsroth [FR]Today at 7:03 AM

    @Whyarp Be careful with 5.7, with some DB script it could block the execution of DB import because of the SQL_MODE (you should set SQL_MODE as an empty string otherwise it could lead to errors).(edited)
     
     
    [7:03 AM]
    Sometimes related to Zero dates instead of 1900-01-01 - 00:00:00
     
     
    [7:04 AM]
    If I remember well 
     
     
  7. To turn a previously downloaded repo without history into a dev mode one that does, I used this command

    Quote

    git fetch --unshallow

    https://stackoverflow.com/questions/6802145/how-to-convert-a-git-shallow-clone-to-a-full-clone

     

    To do the reverse, I am trying this, but it is not working so far..

    https://stackoverflow.com/a/46004595/1091943

    Quote
    
    git fetch --depth 10

    Clear local (now hidden) data:

    Quote
    
    git reflog expire --expire=all --all
    
    
    git tag -l | xargs git tag -d
    
    
    git gc --prune=all

     

  8. 2019 community is current now, but not supported mentioned by Ace; no details on that currently, something about the changed build process.  In the same online installer client I downloaded for 2019 it also offered 2017 community in the available list, which I hear should work fine.  I had already tried it and the 30 day trial ran out, but you can get past that activating it by signing in: https://stackoverflow.com/a/43390495/1091943

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use