DirectAdmin 1.51.3 has been released

There is a bug in awstats_process.sh on FreeBSD:

Code:
root@srv2:/ # /usr/local/directadmin/scripts/awstats_process.sh myuser mydomain.dom
Conversion not required. Continuing normally
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
[: : bad number
[: : bad number
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
/usr/local/directadmin/scripts/awstats_process.sh: /bin/su: not found
Cleanup...

I guess that is why my awstats are not working at all at the moment (there's no link to click on).
 
Creating a symlink from /bin/su to /usr/bin/su did not resolve the issue:

Code:
Conversion not required. Continuing normally
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
[: : bad number
[: : bad number
su: unknown login: /bin/sh
su: unknown login: /bin/sh
Cleanup...
 
Thanks for the report. I've uploaded version 2.6 of the script to files1, so you can grab it like this:
Code:
wget -O /usr/local/directadmin/scripts/awstats_process.sh http://files1.directadmin.com/services/all/awstats/awstats_process.sh
It now uses a variable for su, so can flip between OS's correctly.

John
 
It's correctly pointing to /usr/bin/su, but then it fails again:

Code:
# ./awstats_process.sh cphpvb cphpvb.net
Conversion not required. Continuing normally
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
su: unknown login: /bin/sh
[: : bad number
[: : bad number
su: unknown login: /bin/sh
su: unknown login: /bin/sh
Cleanup...

It's the newest file from your link:

Code:
...
# ./awstats_user.sh <user> <domain>
VERSION=2.6
...
 
Your script is running the command as:

Code:
 ${SU_BIN} -l -s /bin/sh -c "umask 022; $1" ${USER}

That won't work on BSD.

First "-s /bin/sh" is not working (not sure why). Simple running "su -s /bin/sh" on a BSD box produces the error above: "su: unknown login: /bin/sh"

Next, when I removed the -s /bin/sh, it comes that the " -c "umask 022; $1" " is also incorrect. Says unknown class.

Finally I simply tried to do:

Code:
su -l someuser

and guess what - it won't work. It will always say "This account is currently not available." and that's because all users in BSD by default are set as ":/sbin/nologin"... So they don't have shell.

Please note that this is not the only issue. I don't know where the "[: : bad number" error comes from.
 
It looks like you must pass the "-m" parameter. The command "su -m -l someuser" works. This will use the same environment as the current one and, because the script is an sh one, it should be /bin/sh
 
I fixed it!

In FreeBSD the command must be executed as:

Code:
${SU_BIN} -l -m ${USER} -c "umask 022; $1"
 
Thanks!
I've updated to 2.7 on the files1 server:
Code:
wget -O /usr/local/directadmin/scripts/awstats_process.sh http://files1.directadmin.com/services/all/awstats/awstats_process.sh

and will be in the next release of DirectAdmin.

John
 
build versions

build versions is trying to downgrade as update in the report.

[root@host01 ~]# /usr/local/directadmin/custombuild/build versions
Latest version of DirectAdmin: 1.50.1
Installed version of DirectAdmin: 1.51.3

DirectAdmin 1.51.3 to 1.50.1 update is available.
 
Back
Top