LinHES Forums
http://forum.linhes.org/

webmin - " Error - Access denied for"
http://forum.linhes.org/viewtopic.php?f=6&t=6681
Page 1 of 1

Author:  declanh [ Sun Oct 30, 2005 1:14 pm ]
Post subject:  webmin - " Error - Access denied for"

Anyone any idea how to get past this ?

despite having "allow=127.0.0.1 192.168.2.x 192.168.2.0 192.168.0.0
"
in my miniserv.conf
and restarting webmin
I still gettting the follow error when i try to open the url
https://mythbox:10000

Error - Access denied for 192.168.2.x

anyone any ideas (obviously x is the last digit of my private ip)?

Author:  tjc [ Sun Oct 30, 2005 1:43 pm ]
Post subject: 

Mine looks like this (line 19 of 34) :
Code:
allow=127.0.0.1 192.168.1.0

Note that this opens up access for everything in my local network (192.168.1.0/255.255.255.0) so you don't need to have all the specific adresses. Yours should probably say 192.168.2.0 rather than 192.168.1.0 if that's really your local subnet.

Did you fix the hostname (line 4 of 34) too?

Author:  declanh [ Sun Oct 30, 2005 2:11 pm ]
Post subject: 

tjc wrote:
Mine looks like this (line 19 of 34) :
Code:
allow=127.0.0.1 192.168.1.0

Note that this opens up access for everything in my local network (192.168.1.0/255.255.255.0) so you don't need to have all the specific adresses. Yours should probably say 192.168.2.0 rather than 192.168.1.0 if that's really your local subnet.

Did you fix the hostname (line 4 of 34) too?


ok did that - still no luck..

sometimes it gives me the same error and sometimes it gives me a login prompt which fails to login even with the correct password (xxxxx) ...

as set by
/usr/share/webmin/changepass.pl /etc/webmin root xxxxx


stumped...

Author:  tjc [ Sun Oct 30, 2005 4:05 pm ]
Post subject: 

Time to check your log files. Login to the KnopMyth box as root. Do this:
Code:
touch /tmp/marker

Then restart the webmin server and attempt to connect to it.
Code:
/etc/init.d/webmin restart

Finally look to see what log files have changed and read the messages:
Code:
cd /var/log
find . -newer /tmp/marker -print

There ought to be some indicator about what it doesn't like in the files that have changed.

Author:  declanh [ Sun Oct 30, 2005 4:16 pm ]
Post subject: 

tjc wrote:
Time to check your log files. Login to the KnopMyth box as root. Do this:
Code:
touch /tmp/marker

Then restart the webmin server and attempt to connect to it.
Code:
/etc/init.d/webmin restart

Finally look to see what log files have changed and read the messages:
Code:
cd /var/log
find . -newer /tmp/marker -print

There ought to be some indicator about what it doesn't like in the files that have changed.



find . -newer /tmp/marker -print | xargs tail -4 > all.txt

cat all.txt
==> ./auth.log <==
Oct 30 22:06:19 decivo sshd[10821]: (pam_unix) session opened for user root by root(uid=0)
Oct 30 22:06:59 decivo perl: (pam_unix) authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root
Oct 30 22:07:02 decivo webmin[10837]: Webmin starting
Oct 30 22:07:40 decivo webmin[10849]: Invalid login as root from 192.168.2.55

==> ./mysql/mysql.log <==
051030 22:11:43 586 Query SELECT NULL
586 Query SELECT cmds FROM jobqueue WHERE id = 195
586 Query SELECT NULL
586 Query UPDATE jobqueue SET comment = '1% Completed @ 2.9009 fps.' WHERE id = 195

==> ./webmin/miniserv.error <==
Failed to bind to 10000 : Address already in use at /usr/share/webmin/miniserv.pl line 405.
[30/Oct/2005:20:43:53 +0100] [192.168.2.55] /session_login.cgi : Access denied for 192.168.2.55. The host has been block
ed because of too many authentication failures.
[30/Oct/2005:20:43:54 +0100] [192.168.2.55] /favicon.ico : Access denied for 192.168.2.55
Failed to bind to 10000 : Address already in use at /usr/share/webmin/miniserv.pl line 405.

==> ./webmin/miniserv.log <==
192.168.2.55 - - [30/Oct/2005:20:43:54 +0100] "GET /favicon.ico HTTP/1.1" 403 48
192.168.2.55 - - [30/Oct/2005:22:07:34 +0100] "GET / HTTP/1.1" 401 1277
192.168.2.55 - - [30/Oct/2005:22:07:34 +0100] "GET /favicon.ico HTTP/1.1" 401 1277
192.168.2.55 - - [30/Oct/2005:22:07:40 +0100] "POST /session_login.cgi HTTP/1.1" 401 1325



Hmmm - does not give me alot to go on.

Author:  tjc [ Sun Oct 30, 2005 4:32 pm ]
Post subject: 

Nope, that actually supplies several useful clues. Particularly /var/log/webmin/miniserv.error which seems to indicate that 192.168.2.55 has been blocked because of too many failed accesses. I don't remember where the file with that data lives off the top of my head... Look in /etc/webmin/ and under /var in general...

it also looks like you may have two copies running or something. Do this:
Code:
/etc/init.d/webmin stop

Then after 2-3 minutes do this:
Code:
netstat -tan | grep grep 10000

If you see anything still listening on that port you've got a problem. Rebooting may help.

Author:  declanh [ Sun Oct 30, 2005 5:00 pm ]
Post subject: 

tjc you're a star.
sorted now...
it appears that
/etc/init.d/webmin restart was failing to kill the old process

i killed it manually with kill -9 and that sorted it.

thanks again

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/