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.
Pages: 1 [2]
16
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 03:42:05 AM »
/root/watch.sh: line 1: [root@server3: command not found
/root/watch.sh: line 4: syntax error near unexpected token `$'\r''
'root/watch.sh: line 4: `check_user()
after removing the top lines
[root@server ~]# /root/watch.sh
-bash: /root/watch.sh: /bin/sh^M: bad interpreter: No such file or directory
/root/watch.sh: line 4: syntax error near unexpected token `$'\r''
'root/watch.sh: line 4: `check_user()
after removing the top lines
[root@server ~]# /root/watch.sh
-bash: /root/watch.sh: /bin/sh^M: bad interpreter: No such file or directory
17
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 02:16:46 AM »
evety time i do t get error below maybee i not doinf it right
I/O Error.
/home/
here is file contents i changed
#!/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 "open_basedir =/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
is that right
I/O Error.
/home/
here is file contents i changed
#!/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 "open_basedir =/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
is that right
18
New Modules / Re: Two Factor Authorization Mod
« on: February 22, 2020, 01:33:01 AM »
can you post your original contents of the /root/watch.sh file i think i made mistke lol. im not perfect still learning
lol i screwed it up trying to resolve it now
lol i screwed it up trying to resolve it now
19
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 10:20:59 PM »
thanks appericated..
Awsome person willing to help could not ask a stranger for more. 10 out of 10 for this guy.
Awsome person willing to help could not ask a stranger for more. 10 out of 10 for this guy.
20
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 10:06:46 PM »
both root and user are off but still user dir only same:
as you can see the is a user named google and thats all that loads
as you can see the is a user named google and thats all that loads
21
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 07:49:48 PM »
It was perfectly fine before I installed this first version of the mod that was bad. No other mods ect have been previously installed. 200% fine before this The issue never existed before this the fact that it go to the files your mod added shows u it came from your mod
22
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 09:16:36 AM »
That means the file manager in the user admin can’t be used as no access to user files only the ones I noted before. Then my users can’t access their files using built in file manager I will have to not use it thanks
23
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 07:07:57 AM »
ok one last part
/home/google
phpqrcode
the file manager is user control panel loads these dir not the user files home/public_html ect
thanks for the support awsome many many thanks
/home/google
phpqrcode
the file manager is user control panel loads these dir not the user files home/public_html ect
thanks for the support awsome many many thanks
24
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 06:44:29 AM »
workd nowe how do i remove the 2 extra entries in left menu i have now lol.
thanks
so much appericated for this.
thanks
so much appericated for this.
25
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 06:03:03 AM »
se linux disabled
setenforce: SELinux is disabled
the files are in the correct dir
still same error
/usr/local/cwpsrv/htdocs/admin/design
googleAuthenticator.php
showQRCode.php
setenforce: SELinux is disabled
the files are in the correct dir
still same error
/usr/local/cwpsrv/htdocs/admin/design
googleAuthenticator.php
showQRCode.php
26
New Modules / Re: Two Factor Authorization Mod
« on: February 21, 2020, 04:24:35 AM »
i am gertting this error in cwp admin
Warning: require_once(design/googleAuthenticator.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106
Fatal error: require_once(): Failed opening required 'design/googleAuthenticator.php' (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106
when trying to create a key
it has stopped me from loggin into my user control panel. also the file manager only loads this /home/google
phpqrcode not my site files
i reinstalled it to try that now i have 2 entries in the left menu. sorry to be a pain
any help would be great as i really want the use of this mod
Warning: require_once(design/googleAuthenticator.php): failed to open stream: No such file or directory in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106
Fatal error: require_once(): Failed opening required 'design/googleAuthenticator.php' (include_path='.:/usr/local/cwp/php71/lib/php') in /usr/local/cwpsrv/htdocs/resources/admin/modules/cwp2fa.php on line 106
when trying to create a key
it has stopped me from loggin into my user control panel. also the file manager only loads this /home/google
phpqrcode not my site files
i reinstalled it to try that now i have 2 entries in the left menu. sorry to be a pain
any help would be great as i really want the use of this mod
Pages: 1 [2]