Robis Posted February 17, 2005 Report Share Posted February 17, 2005 Sveiki! Vai kāds varētu lūdzu pateikt, kā varu uztaisīt .htpasswd failu, lai viss darbotos? Piejamie līdzekļi: 1) text editors; 2) ftp uz serveri; Link to comment Share on other sites More sharing options...
Robis Posted February 17, 2005 Author Report Share Posted February 17, 2005 Varbut kads var palidzet vismaz iedot kadu materialu? Vai tur ir jaizmanto PERL script, nu ka var uzlikt kadam direktorijam passwordu? Link to comment Share on other sites More sharing options...
blackhalt Posted February 17, 2005 Report Share Posted February 17, 2005 konsolē ieraksti htpasswd Link to comment Share on other sites More sharing options...
Robis Posted February 17, 2005 Author Report Share Posted February 17, 2005 konsolē ieraksti htpasswd 13832[/snapback] Kā to var izdarīt? Man ir pieejams tikai ftp uz sava servera root direktoriju (ar cgi-bin utt.) Vai to var izdarīt kaut kā savādāk? Link to comment Share on other sites More sharing options...
рпр Posted February 17, 2005 Report Share Posted February 17, 2005 to jau arii var izdarīt ar php, ja tev nav pieeja konsolei: http://lv.php.net/manual/en/features.http-auth.php vai arii kotaktē ar administratoru, lai viņš tev uztaisa. tev tāpat jāzin, kur glabājas tas fails, kurā ir paroles, lai uztaisītu. Link to comment Share on other sites More sharing options...
blackhalt Posted February 17, 2005 Report Share Posted February 17, 2005 (edited) nu saku konsolee ieraksti: # htpasswd -c /fails kaka New password: Re-type new password: Adding password for user kaka buus /fails : kaka:tUL/Fxwpa5z.A nu un to failu uzmet uz servera. Ā, laikam sapratu. Tev ir windows utt. Uz savas kastes vari uztaisīt to failu, ja tev ir apache. un no savas uzkopeet to failu uz to serveri. Edited February 17, 2005 by blackhalt Link to comment Share on other sites More sharing options...
Robis Posted February 17, 2005 Author Report Share Posted February 17, 2005 (edited) Ā, laikam sapratu. Tev ir windows utt. Uz savas kastes vari uztaisīt to failu, ja tev ir apache. un no savas uzkopeet to failu uz to serveri. 13836[/snapback] To nokodeto username:parole var uztaisit ari tapat (interneta kaut vai ir piejami un ari pats ari php un server starpniecibu! Vieniga problema, ka man nesanak, nez, iemetu it ka .htpasswd un .htgroup ieksh cgi-bin direktorijas! Varbut tapec? kura direktorija vinji jamet uz servera? Edited February 17, 2005 by Robis Link to comment Share on other sites More sharing options...
blackhalt Posted February 17, 2005 Report Share Posted February 17, 2005 Vieniga problema, ka man nesanak, nez, iemetu it ka .htpasswd un .htgroup ieksh cgi-bin direktorijas! Varbut tapec? kura direktorija vinji jamet uz servera? Ārpus web direktorijas shitaa varētu izskatīties .htaccess fails: AuthUserFile /home/blabla/.htpasswd AuthGroupFile /home/blabla/.htgroup AuthName "Autorizaacija" AuthType Basic <Limit GET> require group jankapanka </Limit> Link to comment Share on other sites More sharing options...
Robis Posted February 17, 2005 Author Report Share Posted February 17, 2005 Ārpus web direktorijasshitaa varētu izskatīties .htaccess fails: AuthUserFile /home/blabla/.htpasswd AuthGroupFile /home/blabla/.htgroup AuthName "Autorizaacija" AuthType Basic <Limit GET> require group jankapanka </Limit> 13844[/snapback] To es zinu jau! :) Es tikai gribu zinat, vai cgi-bin neskaitas web direktorija, web direktorija ir tipa, tikai ta html? (ta, kas veras, kad ver valja domenu) es ieliku cg-bin un nestradaja, bet vienkarshi arpus tam direktorijam, varbut jaliek ari arpus www direktorijas? Link to comment Share on other sites More sharing options...
blackhalt Posted February 17, 2005 Report Share Posted February 17, 2005 (edited) To es zinu jau! :) Es tikai gribu zinat, vai cgi-bin neskaitas web direktorija, web direktorija ir tipa, tikai ta html? (ta, kas veras, kad ver valja domenu)es ieliku cg-bin un nestradaja, bet vienkarshi arpus tam direktorijam, varbut jaliek ari arpus www direktorijas? liec abus failus iekš: /var/www Ja hostings ir uz serveris.lv pateikšu sīkāk ;) Edited February 17, 2005 by blackhalt Link to comment Share on other sites More sharing options...
Robis Posted February 17, 2005 Author Report Share Posted February 17, 2005 liec abus failus iekš:/var/www 13848[/snapback] Diemžēl iekš /var/www/ serveris neljauj ielādēt caur FTP: STOR .htgroup 550 .htgroup: Permission denied (tas pats par .htpasswd) Bet nomainit CHMODU uz 777 www direktorijai jau serveris neljauj. Link to comment Share on other sites More sharing options...
blackhalt Posted February 17, 2005 Report Share Posted February 17, 2005 liec abus failus iekš:/var/www 13848[/snapback] Diemžēl iekš /var/www/ serveris neljauj ielādēt caur FTP: STOR .htgroup 550 .htgroup: Permission denied (tas pats par .htpasswd) Bet nomainit CHMODU uz 777 www direktorijai jau serveris neljauj. 13851[/snapback] shas tev privātziņu aizsūtīšu ;) Link to comment Share on other sites More sharing options...
Robis Posted February 18, 2005 Author Report Share Posted February 18, 2005 Man ir jautājums: Vai ielogojoties caur .htpasswd uz konkreto direktoriju tiek izveidota sesija, tipa, lai es varetu likt ta ka tur saita administraciju vai ari vel php koda ir jaizveido sesija un ja nospiezh "iziet", kas tad notiek? Ka iznicinat sesiju, ja tāda izveidojas? Link to comment Share on other sites More sharing options...
Venom Posted February 18, 2005 Report Share Posted February 18, 2005 tur nav sessija pierastā veida, bet gan papildus HTTP headeru negotiations - to var papildus iečekot iekš $_SERVER['PHP_AUTH_USER'] un $_SERVER['PHP_AUTH_PW'], pie izlogošanas jāsūta header('HTTP/1.0 401 Unauthorized'); vai jāmaina autentifikācijas "zona" - realms (header('WWW-Authenticate: Basic realm="[realm]"'); Link to comment Share on other sites More sharing options...
Robis Posted February 18, 2005 Author Report Share Posted February 18, 2005 A kā var uzlikt, ka, kad izlogojas, aizveras arī browser logs? Link to comment Share on other sites More sharing options...
Recommended Posts