| View previous topic :: View next topic |
| Author |
Message |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 09, 2009 8:20 pm Post subject: |
|
|
Then you misunderstood. If I meant you to place the line in the file I would of said so. The command is something you run in your server command line, it will write a single line into the .htpasswd file.
php -r 'printf("my.username:%s\n",md5("my.password"));' >> .htpasswd
If you _run_ that command then a line will be appended to the file named at the end (.htpasswd). You can always remove any unwanted lines with any text editor.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Fri Oct 09, 2009 9:40 pm Post subject: |
|
|
ok understood.
but the file .ht is not the unique I have on my server.
I've located several same files.
Maybe should I write this code:
a) by writing exacly the location?
php -r 'printf("my.username:%s\n",md5("my.password"));' >> /home/user/icecast/.htpasswd
or
b) by going through the terminal, to that directory and then write that line??
so many thank you )))))) _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 09, 2009 9:45 pm Post subject: |
|
|
Either way will do. Using an absolute path is often recommended though so that the assumption of the current directory is not required.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Fri Oct 09, 2009 10:10 pm Post subject: |
|
|
| karlH wrote: |
Either way will do. Using an absolute path is often recommended though so that the assumption of the current directory is not required.
karl. |
just did it and is not working again
root@fresh [~]# cd /home/icecast
root@fresh [/home/icecast]# php -r 'printf("mine:%s/n",md5("mine"));'>>.htpasswd
root@fresh [/home/icecast]#
again the error at the browser:
XML Parsing Error: syntax error
Location: http://xx.xx.xx.xxx:8000/status.xsl
Line Number 1, Column 1:You need to authenticate
^
But now, when I tried http://xx.xx.xx.xxx:8000/status.xls at the authentication window, I noticed something.
Authentication Required
A username and password are being requested by http://xx.xx.xx.xxx:8000. The site says: "Icecast2 Server"
That is for the admin panel. It does not say
"A username and password are being requested by http://xx.xx.xx.xxx:8000/status.xsl"
I was thinking,that maybe I should somewhere write that:
Before the admin authentication, request authentication to view the status.xsl.
From my little-little-little knowledge in programming/html/php, the way and the order of accessing or view something can be done through .htaccess
and if yes, how and where.
if not.... any other suggestions?
p.s.: at the http://xx.xx.xx.xxx:8000/admin I can login but I can see only the index. Admin home/list mountpoints/move listeners, it requests me authentication. _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 09, 2009 11:18 pm Post subject: |
|
|
I still don't see any details so I take it that you have checked that the entry you have just added is in the .htpasswd file and that the error log is reporting that the file has been read.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Fri Oct 09, 2009 11:25 pm Post subject: |
|
|
| karlH wrote: |
I still don't see any details so I take it that you have checked that the entry you have just added is in the .htpasswd file and that the error log is reporting that the file has been read.
karl. |
I'm not sure that I got the meaning of what you are writing correct, but yes the entry has been added, yes checked it
and the error log says:
[2009-10-10 02:22:17] INFO auth/auth_add_listener adding client for authentication
[2009-10-10 02:22:17] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
[2009-10-10 02:22:18] INFO auth/auth_add_listener adding client for authentication
[2009-10-10 02:22:18] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
[2009-10-10 02:22:18] INFO auth_htpasswd/htpasswd_recheckfile re-reading htpasswd file "/home/icecast/.htpasswd"
[2009-10-10 02:22:22] INFO auth/auth_add_listener adding client for authentication
[2009-10-10 02:22:22] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
[2009-10-10 02:22:33] INFO auth/auth_add_listener adding client for authentication
[2009-10-10 02:22:33] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
but still I cannot login. I get the same message at my browser
XML Parsing Error: syntax error
Location: http://xx.xx.xx.xxx:8000/status.xsl
Line Number 1, Column 1:You need to authenticate
^ _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Fri Oct 09, 2009 11:50 pm Post subject: |
|
|
increase the log level and try connecting again
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sat Oct 10, 2009 12:39 am Post subject: |
|
|
| karlH wrote: |
increase the log level and try connecting again
karl. |
the log level is:
<loglevel>3</loglevel> <!-- 4 Debug, 3 Info, 2 Warn, 1 Error -->
<logsize>10000</logsize> <!-- Max size of a logfile -->
do it 4 and restart icecast? or no need to restart? _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sat Oct 10, 2009 1:17 am Post subject: |
|
|
a restart will do it, but you may be able to get away with kill -HUP <pid> if you don't use changeowner
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sun Oct 11, 2009 8:52 pm Post subject: |
|
|
| karlH wrote: |
a restart will do it, but you may be able to get away with kill -HUP <pid> if you don't use changeowner
karl. |
hello and sorry for the late reply.
I just did it.
and nop, not working. the same as all the previous times.
the error log, writes the following, but the password cannot be wrong-as it says, from me, because I have changed it to something very simple, just for this check.
[2009-10-11 23:46:32] INFO auth/auth_add_listener adding client for authentication
[2009-10-11 23:46:32] DBUG auth/queue_auth_client ...refcount on auth_t /status.xsl is now 2
[2009-10-11 23:46:32] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
[2009-10-11 23:46:32] DBUG auth/auth_run_thread 1 client(s) pending on /status.xsl
[2009-10-11 23:46:32] INFO auth_htpasswd/htpasswd_recheckfile re-reading htpasswd file "/home/icecast/.htpasswd"
[2009-10-11 23:46:32] DBUG auth_htpasswd/htpasswd_auth incorrect password for client
[2009-10-11 23:46:32] DBUG auth/auth_release ...refcount on auth_t /status.xsl is now 1
[2009-10-11 23:46:32] DBUG fserve/fserve_add_client Adding client to file serving engine
[2009-10-11 23:46:32] DBUG stats/modify_node_event update node client_connections (56)
[2009-10-11 23:46:32] DBUG stats/modify_node_event update node clients (3)
[2009-10-11 23:46:37] DBUG stats/modify_node_event update node total_bytes_read (10815000)
[2009-10-11 23:46:37] DBUG stats/modify_node_event update node total_bytes_sent (16818501)
[2009-10-11 23:46:42] DBUG stats/modify_node_event update node total_bytes_read (10894800)
[2009-10-11 23:46:42] DBUG stats/modify_node_event update node total_bytes_sent (16978106)
[2009-10-11 23:46:47] DBUG stats/modify_node_event update node total_bytes_read (10976000)
[2009-10-11 23:46:47] DBUG stats/modify_node_event update node total_bytes_sent (17140511)
[2009-10-11 23:46:49] DBUG stats/modify_node_event update node clients (4)
[2009-10-11 23:46:49] DBUG stats/modify_node_event update node connections (5
[2009-10-11 23:46:49] INFO auth/auth_add_listener adding client for authentication
[2009-10-11 23:46:49] DBUG auth/queue_auth_client ...refcount on auth_t /status.xsl is now 2
[2009-10-11 23:46:49] INFO auth/queue_auth_client auth on /status.xsl has 1 pending
[2009-10-11 23:46:49] DBUG auth/auth_run_thread 1 client(s) pending on /status.xsl
[2009-10-11 23:46:49] DBUG auth_htpasswd/htpasswd_auth incorrect password for client
[2009-10-11 23:46:49] DBUG auth/auth_release ...refcount on auth_t /status.xsl is now 1
[2009-10-11 23:46:49] DBUG fserve/fserve_add_client Adding client to file serving engine
[2009-10-11 23:46:49] DBUG stats/modify_node_event update node client_connections (57)
[2009-10-11 23:46:49] DBUG stats/modify_node_event update node clients (3)
[2009-10-11 23:46:52] DBUG stats/modify_node_event update node total_bytes_read (11054253)
[2009-10-11 23:46:52] DBUG stats/modify_node_event update node total_bytes_sent (17294516) _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Sun Oct 11, 2009 9:51 pm Post subject: |
|
|
So the auth is performed for the xsl file request, so there must be a mismatch between what user/pass have specified with the url and what is in the /home/icecast/.htpasswd file. now let's check what is in the .htpasswd file against the intended user/pass.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Sun Oct 11, 2009 10:16 pm Post subject: |
|
|
| karlH wrote: |
So the auth is performed for the xsl file request, so there must be a mismatch between what user/pass have specified with the url and what is in the /home/icecast/.htpasswd file. now let's check what is in the .htpasswd file against the intended user/pass.
karl. |
If I understood correct, you mean what is written in the file:
root@fresh [/]# cd /home/icecast
root@fresh [/home/icecast]# cat .htpasswd
icecast_stats:---------/-
root@fresh [/home/icecast]#
that's all. _________________ www.freshwebradio.com
Last edited by sonia on Mon Oct 12, 2009 1:23 am; edited 1 time in total |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Oct 12, 2009 1:00 am Post subject: |
|
|
seeing that you did not post the intended password, I'll assume you meant the password you sent me privately, in which case the line in the file has an invalid md5 hash so therefore the auth fails.
karl. |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Mon Oct 12, 2009 1:14 am Post subject: |
|
|
| karlH wrote: |
seeing that you did not post the intended password, I'll assume you meant the password you sent me privately, in which case the line in the file has an invalid md5 hash so therefore the auth fails.
karl. |
and are you proposing to do?? _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
sonia

Joined: 28 Dec 2008 Posts: 67 Location: Greece
|
Posted: Mon Oct 12, 2009 1:43 am Post subject: |
|
|
THANK YOU - THANK YOU - THANK YOU
a million "thank you" aren't enough, for all your help to me. _________________ www.freshwebradio.com |
|
| Back to top |
|
 |
|