#!/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/firebird-tools-userdrop - Firebird SQL Server remove user # # Creation: 2004-02-12 jv # Last Update: $Id$ # # Copyright (c) 2004-2010 Jens Vehlhaber, jvehlhaber(at)eisfair(dot)org # Copyright (c) 2015-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # 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 export FIREBIRD='/usr/lib/firebird' # --------------------------------------------------------------------------- # check for running # --------------------------------------------------------------------------- if [ -z "$(pgrep '(fbserver|fbguard)')" ] then mecho "" mecho --error "Firebird is not running" mecho "" anykey exit 1 fi clrhome # read the ISC_PASSWORD only pw=`grep ISC_PASSWORD= ${FIREBIRD}/isc4.pw | sed "s/ISC_PASSWORD=//g"` # Remove user mecho --info "Remove Firebird user" mecho "" mecho -n "Enter username: " read DropName mecho "" mecho "" txtout=`/usr/bin/gsec -user SYSDBA -password $pw -delete $DropName 2>&1` if [ ! -z "$txtout" ] then mecho --error "Error! User not removed." mecho "$txtout" mecho "" fi anykey exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------