Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - rcschaff

Pages: 1 ... 44 45 [46] 47 48 ... 55
676
SSL / Re: SSL_ERROR_BAD_CERT_DOMAIN after SSL renewal
« on: February 24, 2020, 02:24:03 PM »
rebuild the config files.  It's a weird bug that doesn't always happen, but does on occasion.

677
Installation / Re: centos 7 with virtualbox
« on: February 24, 2020, 02:22:55 PM »
1)  Used a bridged network.   A NAT network treats your host computer as a router behind a router.
2)  Setup your IP issued on you VM's IP as a DMZ.
3)  Make sure no port forwarding rules are setup to other boxes, they will override DMZ
4)  Make sure CWP is in NAT mode.
5)  After setting CWP to NAT mode, rebuild all configs.

678
New Modules / Re: [Module] CWP_2FA
« on: February 24, 2020, 01:22:06 AM »
Video uploaded to the GitHub Page

679
CentOS 7 Problems / Re: Nagios Xi and CWP Pro problem
« on: February 23, 2020, 10:26:01 PM »
Out of curiosity, does the service shut down after an update.
 Do you really need to restart the entire server, or can you just restart the service...

680
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 04:27:52 AM »
Module moved to github: https://github.com/rcschaff82/cwp_2fa

Created new topic noting so and locking this one.

681
New Modules / [Module] CWP_2FA
« on: February 22, 2020, 04:27:06 AM »
I have decided to move the module to github. 

Please visit: https://github.com/rcschaff82/cwp_2fa

682
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 04:03:40 AM »

683
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 03:54:45 AM »
Go-to the end of #!/bin/sh and hit enter after the h.  For some reason a carriage return was added to the end of the line.

684
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 03:45:51 AM »
Remove the first line.  Didn't realize it copied

685
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 03:30:56 AM »
Use this, as I forgot to update the check of the user configs was changed as well.
/root/watch.sh
Code: [Select]
#!/bin/sh
pid=` ps aux | grep -v grep | pgrep -f cron.php`
check_user()
{
echo "//////////User Checks//////////"
cd /usr/local/cwpsrv/var/services/users/login
if [ "$(tail -1 index.php)" == "?>" ] ; then
                return
        fi
chattr -i .
chattr -i *
echo "Moving Files"
cp -f index.php abcdefg.php
cp -f login.php index.php
chattr +i *
chattr +i .
}
check_configs()
{
echo "//////////Config Checks//////////"
FILES=/usr/local/cwpsrv/conf.d/users/*
for f in $FILES
do
if ! grep -q "/home/google" $f; then
    echo updateing $f
     sed -i -re 's@open_basedir(.*)(";)@\1:/home/google\2@' $f
fi
done
if grep -q "open_basedir = /tmp" /usr/local/cwpsrv/conf.d/users.conf; then
updating users.conf
sed -i "s@fastcgi_param   PHP_ADMIN_VALUE \"open_basedir = /tmp@fastcgi_param   PHP_ADMIN_VALUE \"open_basedir = /home/:/tmp@g" /usr/local/cwpsrv/conf.d/users.conf

fi
/usr/local/cwpsrv/bin/cwpsrv -s reload
find /home/*/.conf/cwp.ini -exec sed -i "s@original@modified@g" {} +

}
check_admin()
{
echo "//////////Admin Checks//////////"
        cd /usr/local/cwpsrv/htdocs/admin/login/
        if [ "$(tail -1 index.php)" == "?>" ] ; then
                return
        fi
        echo "Moving Admin"
        chattr -i .
        chattr -i *
        ls | grep -P "[a-z0-9]{16}" | xargs -d"\n" rm
        RAND_CHARS=$(openssl rand -hex 16)
        mv index.php $RAND_CHARS.php
        cp index_working.php index.php
        sed -i "s@define(\"DO_LOGIN\",\"\");@define(\"DO_LOGIN\",\"$RAND_CHARS.php\");@g" index.php
        chattr +i *
        chattr +i .
}
if [ "$pid" != "" ]; then
while [ -e /proc/$pid ]
do
    sleep .6
done
fi
echo "Start Checks"
check_user
check_admin
check_configs


686
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 01:59:46 AM »
Original file should be in cwp_2fa folder from untar

687
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 01:10:44 AM »
Updated md5sum   b100f5a2bd1f02330cd1da2531749b6e

Changelog:

Bugfix of user filemanager displaying /home/google instead of home directory
Added check for ntpd service.  Installs and starts if not installed
install script disables selinux temporarily if it is enabled, then reenables it.
install script notifies how to set proper timezone at end

688
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 01:06:13 AM »
I have a patch for you:
first:
edit /root/watch.sh file
Remove line 26  "sed -i "s@fastcgi_param   PHP_ADMIN_VA....."
Add in it's place  "   sed -i -re 's@open_basedir(.*)(";)@\1:/home/google\2@' $f     "

then run: 
 sed -i "s@open_basedir =/home/google/:@open_basedir =@g" /usr/local/cwpsrv/conf.d/users/*

finally run:
/root/watch.sh

This should fix the issue for users.  Root would normally start in /tmp, so I don't think it's too big of a bug ;)

689
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 10:13:00 PM »
I'll look into it

690
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 09:26:36 PM »
Turn off 2fa for root and see if it persists while it's off.  They may have changed something on the backend.

Pages: 1 ... 44 45 [46] 47 48 ... 55