#!/bin/sh
#260131 sfs
  CONFIG_FILE="/etc/security/faillock.conf"
  F=$(faillock | grep -c "V$" 2>/dev/null)
  D=$(grep -oP 'deny\s*=\s*\K\d+' "$CONFIG_FILE" 2>/dev/null || echo "3")  # По умолчанию 3 попыток

 p="`yad --title="Запуск '$aa' от root" \
    --text=" Запуск \'$aa\' от <b>root</b>:" \
    --image="gtk-dialog-authentication" \
    --window-icon="gtk-dialog-authentication" \
    --name="gtk-dialog-authentication" \
    --fixed \
    --image-on-top --center \
    --form \
    --field="Пароль ($F попытки из $D):H" \
    --Xfield="Повтор:H" \
    --hide-text \
    --Xbutton="Пароль (3 попытки)"!gtk-dialog-authentication!"Пароль (3 попытки)"  \
    --Xbutton=gtk-cancel  \
    --separator='\n'
`"
echo "$p" 
