#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/webconf-access - Change Webconf Password # # Creation: 07.03.2002 chriswue # Last Update: $Id$ # # Copyright (c) 2002-2004 Frank Meyer # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib clrhome mecho -info "Change Basic Authentification for webconf" echo /etc/init.d/webconf stop echo if [ "$1" = "" ] then new_user=`/var/install/bin/ask "login" "webadmin" "+"` else new_user="$1" fi if [ "$2" = "" ] then /usr/bin/htpasswd -c /var/config/www/.htpasswd "$new_user" else echo $2 | /usr/bin/htpasswd -c /var/config/www/.htpasswd "$new_user" fi cp -f /var/config/www/.htpasswd /var/config/www/cgi-bin/.htpasswd echo /etc/init.d/webconf start echo anykey exit 0