DirectAdmin v1.644 RC

For user creation control you can use dedicated user_create_(pre|post).sh hook. It it not possible to disable the use of user password form shadow file, but you can just set it to a random value and forget it.
Thanks for giving information on the reasons for all_pre.sh and it makes sense.

So a question if the admin password is the same password as the login key - whats used - login key or password. If it defaults to login key with ip restriction then that actually could work for me.
 
Was doing updating/testing on Debian 10.13 doing custombuild (1.644 - d9516972857f74a2505b8a4d9fdb8c29b6ef3ef2) update w/openlitespeed, w/lsphp, php 8.2 RC1 fails to build.

Code:
/bin/bash /usr/local/directadmin/custombuild/php-8.2.0RC1/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Isapi/phpdbg/ -I/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/phpdbg/ -I/usr/local/directadmin/custombuild/php-8.2.0RC1/include -I/usr/local/directadmin/custombuild/php-8.2.0RC1/main -I/usr/local/directadmin/custombuild/php-8.2.0RC1 -I/usr/local/directadmin/custombuild/php-8.2.0RC1/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include/freetype2 -I/usr/local/icu/include -I/usr/local/directadmin/custombuild/php-8.2.0RC1/ext/mbstring/libmbfl -I/usr/local/directadmin/custombuild/php-8.2.0RC1/ext/mbstring/libmbfl/mbfl -I/usr/local/directadmin/custombuild/php-8.2.0RC1/TSRM -I/usr/local/directadmin/custombuild/php-8.2.0RC1/Zend  -D_GNU_SOURCE  -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -g -O2 -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -c /usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/phpdbg/phpdbg_cmd.c -o sapi/phpdbg/phpdbg_cmd.lo  -MMD -MF sapi/phpdbg/phpdbg_cmd.dep -MT sapi/phpdbg/phpdbg_cmd.lo
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c: In function 'php_lsapi_startup':
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c:124:9: error: too many arguments to function 'php_module_startup'
     if (php_module_startup(sapi_module, NULL, 0)==FAILURE) {
         ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c:21:
/usr/local/directadmin/custombuild/php-8.2.0RC1/main/php_main.h:28:20: note: declared here
 PHPAPI zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module);
                    ^~~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c: In function 'main':
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c:1817:9: error: too many arguments to function 'php_module_startup'
     if (php_module_startup(&lsapi_sapi_module, &litespeed_module_entry, 1) == FAILURE) {
         ^~~~~~~~~~~~~~~~~~
In file included from /usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapi_main.c:21:
/usr/local/directadmin/custombuild/php-8.2.0RC1/main/php_main.h:28:20: note: declared here
 PHPAPI zend_result php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_module);
                    ^~~~~~~~~~~~~~~~~~
make: *** [Makefile:778: sapi/litespeed/lsapi_main.lo] Error 1
make: *** Waiting for unfinished jobs....
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapilib.c: In function 'LSAPI_ParseSockAddr.part.14':
/usr/local/directadmin/custombuild/php-8.2.0RC1/sapi/litespeed/lsapilib.c:2667:9: warning: 'strncpy' output may be truncated copying 108 bytes from a string of length 255 [-Wstringop-truncation]
         strncpy( ((struct sockaddr_un *)pAddr)->sun_path, p,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                 sizeof(((struct sockaddr_un *)pAddr)->sun_path) );
                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** The make has failed. Exiting...
 
DA v1.645 is available on the alpha release channel. It will continue to stay as DA v1.645 and accumulate changes until we release it as RC to beta and finally to current. Right now there is no 1.645 RC, just 1.645 work-in-progress :D.
 
Last edited:
Latest update seems to have caused an issue with litespeed:

$cur_serial = $mInfo['serial'];
$admin_url = $mInfo['adminurl'];

Also having issues scanning for new wordpress installs.
 
I noticed in the change log:

Usage of login_pre.sh, all_pre.sh, all_post.sh hooks are discouraged. For backwards compatibility reasons these hooks will be called but only by the old DirectAdmin commands.


In the past all_pre.sh could be used for
* denying a command (like CMD_API_ACCOUNT_ADMIN /CMD_ACCOUNT_ADMIN )
* limiting access to an admin account per ip address

Is there anything that now supersedes this for a similar function?
We're using login_pre hook to restrict admin logins to specific IP addresses. I understand why all_pre.sh is removed and we need to use more specific hooks but login_pre seems a pretty specific hook to me. We really need the possibility to restrict access to admin accounts by IP-address, how can we achieve that without login_pre? Is there another hook which we can use for that?
 
I've never used login_pre.sh but session_create_pre.sh for a custom 2FA @ Google/Telegram/WhatsApp for SSH, i guess that's a good alternative?

Just "exit 0;" when ip/host is allowed, "exit 1;" if not.
 
Last edited:
Can I disable password logins as the admin user to force only login keys?

And what about preventing the creation of a second admin user?


Yes, you can. You will need to use a custom script all_pre.sh for it and control an additional parameter there "IS_LOGIN_KEY", which is set to 1, when a login key is used:

Code:
IS_LOGIN_KEY=1

and is set to 0, when a password is used:

Code:
IS_LOGIN_KEY=0

Available in all_pre.sh, a support of which they announced to be dropped.
 
Back
Top