Hmm, also bis zu einer KONTONUMMER bin ich noch gar nicht vorgedrungen!!!
Bisher habe ich nur für eine (10-stellige) CUSTOMER_ID mit einer (6-stelligen) USER_ID ein OHBCI-Schlüssel generiert und an den Bankserver geschickt, sowie im Anschluß einen INI-Brief erzeugt und diesen postalisch an die Bank geschickt...
Im Anschluss folgt das dazu verwendete Skript, welches für diese Schritte die Variable INISENTTOBANK auf 'n' gesetzt hatte:
Code
#!/bin/bash
##########################################################
#
# This script creates the necessary keys for HBCI, as
# well as the INI letter which has to be sent to bank.
#
##########################################################
MEDIUM=HD-DB.medium
CHARSET=utf8
. bankinfo.bash
# this defines:
#BANK=
#CUSTOMER_ID=
#USER_ID=
INISENTTOBANK=y
if [ "$INISENTTOBANK" == "n" ]; then
[ -f $MEDIUM ] && rm $MEDIUM
aqhbci-tool3 --charset=$CHARSET deluser -c $CUSTOMER_ID
# Generate medium
gct-tool create -t ohbci -n $MEDIUM
# Add the one and only possible user for OHBCI-CryptToken in AqBanking
aqhbci-tool3 --charset=$CHARSET adduser -t ohbci -n $MEDIUM \
--context=1 -b $BANK -u $USER_ID -c $CUSTOMER_ID -s 193.150.167.8 -N "Bernd Beispiel"
# Get server keys
aqhbci-tool3 --charset=$CHARSET getkeys -c $CUSTOMER_ID
# Show all keys
gct-tool showkey -t ohbci -n $MEDIUM
# Generate new keys
aqhbci-tool3 --charset=$CHARSET createkeys -c $CUSTOMER_ID
echo -n "Are you sure that you want to send the keys to the bank now (y/N): "
read -sn 1 ANSWER
if [ "$ANSWER" == "y" ]; then
# Do this only when all is ready
aqhbci-tool3 --charset=$CHARSET sendkeys -c $CUSTOMER_ID
# Print ini-letter
aqhbci-tool3 --charset=$CHARSET iniletter -c $CUSTOMER_ID >ini.txt
echo
echo "SUCCESS: Keys could have been sent to bank and INI letter created..."
else
echo
echo "ABORT: Keys not send to bank."
fi
fi
# This works only when bank has enabled HBCI after having received user's INI-letter
aqhbci-tool3 --charset=$CHARSET getsysid -c $CUSTOMER_ID
Soweit so gut, die Bank bestätigt den Erhalt des INI-Briefes, schaltet alles frei und trotzdem gibt der letzte Aufruf von aqhbci-tool3 nur die bekannten Fehlermeldungen...