Script zum Eintragen der Daten in .htpasswd

N

ne0x

Neues Mitglied
Thread Starter
Dabei seit
18.10.2007
Beiträge
6
Reaktionspunkte
0
Hallo,
gibt es ein Script oder so, wo ich mir die Daten für die .htpasswd generieren und automatisch in die .htpasswd datei auch eintragen kann?

Also: Ich hab meine Seite im Adminbereich, klicke auf Userhinzufügen, gib als User Admin ein und als Passwort Test ein, danach spuckt es mir Admin:$1$YS0y761C$llor5QZ/YBaf7XJyrCrAW0 aus und das soll automatisch dann auch gleich in die .htpasswd eingetragen werden!

Ist das umsetzbar? Bitte um hilfe!
Gruß,
ne0x
 
irgendwo auf meiner platte war doch sowas ... kruschtel ... ah, in stuff :D ... ist uralt, weiss nicht ob es sicher ist, etc ... kannst es dir ja mal ohne gewähr anschauen ;)
 

Anhänge

  • access.php.zip
    4,4 KB · Aufrufe: 52
Hallo, vielen Dank ;-)
Hat mir weitergeholfen!

Mod: Kann geclosed werden
 
Ansonten hilft auch:
im Terminal.
htpasswd --help
Usage:
htpasswd [-cmdps] passwordfile username
htpasswd -b[cmdps] passwordfile username password

htpasswd -n[mdps] username
htpasswd -nb[mdps] username password
-c Create a new file.
-n Don't update file; display results on stdout.
-m Force MD5 encryption of the password.
-d Force CRYPT encryption of the password (default).
-p Do not encrypt the password (plaintext).
-s Force SHA encryption of the password.
-b Use the password from the command line rather than prompting for it.
On Windows, TPF and NetWare systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.
Damit kann man die Datei ganz schnell selbst erstellen oder erweitern. Mit automatischem Ergänzen der .htaccess mittels php-Skript wäre ich vorsichtig.
 
htpasswd ist das tool der Wahl dafür und es macht Sinn sich damit kurz zu befassen :jaja:

geclosed wird hier nicht ;)
 
Zurück
Oben Unten