Rework front audit gui

master
Артемий 3 years ago
commit 4ff7e8cbe4

@ -1,24 +1,32 @@
all:
cd po/back_auditd ; msgfmt -o linux-infosec-setupper-back_auditd.mo ru.po
@echo Run make install
install:
# bin is for scripts which will run sbin/* via pkexec
#mkdir -p $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/bin
# sbin is for executables
mkdir -p $(DESTDIR)/usr/sbin
install -m0755 front_auditd_cli.sh $(DESTDIR)/usr/sbin/linux-infosec-setupper-auditd-cli
install -m0755 front_pwquality_cli.sh $(DESTDIR)/usr/sbin/linux-infosec-setupper-pwquality-cli
install -m0755 front_pwquality.sh $(DESTDIR)/usr/sbin/linux-infosec-setupper-pwquality-gui
mkdir -p $(DESTDIR)/usr/share/linux-infosec-setupper
mkdir -p $(DESTDIR)/usr/share/linux-infosec-setupper/audit
#mkdir -p $(DESTDIR)/usr/share/linux-infosec-setupper/pwquality
mkdir -p $(DESTDIR)/usr/share/linux-infosec-setupper/pwquality
install -m0644 pw_default $(DESTDIR)/usr/share/linux-infosec-setupper/pwquality/pw_default
install -m0644 common.sh $(DESTDIR)/usr/share/linux-infosec-setupper/common.sh
install -m0644 back_auditd.sh $(DESTDIR)/usr/share/linux-infosec-setupper/audit/back_auditd.sh
install -m0644 back_pwquality.sh $(DESTDIR)/usr/share/linux-infosec-setupper/pwquality/back_pwquality.sh
mkdir -p $(DESTDIR)/var/lib/linux-infosec-setupper
mkdir -p $(DESTDIR)/var/lib/linux-infosec-setupper/audit
#mkdir -p $(DESTDIR)/var/lib/linux-infosec-setupper/pwquality
chmod -R 0700 $(DESTDIR)/var/lib/linux-infosec-setupper
mkdir -p $(DESTDIR)/usr/share/locale/ru/LC_MESSAGES
install -m0644 po/back_auditd/linux-infosec-setupper-back_auditd.mo $(DESTDIR)/usr/share/locale/ru/LC_MESSAGES
msgfmt -o $(DESTDIR)/usr/share/locale/ru/LC_MESSAGES/linux-infosec-setupper.mo po/ru.po
mkdir -p $(DESTDIR)/usr/share/polkit-1/actions
install -m0644 polkit/org.nixtux.pkexec.linux-infosec-setupper-pwquality-gui.policy $(DESTDIR)/usr/share/polkit-1/actions/
install -m0755 polkit/linux-infosec-setupper-pwquality-gui.sh $(DESTDIR)/usr/bin/linux-infosec-setupper-pwquality-gui
rpm:
# https://stackoverflow.com/a/1909390

@ -9,8 +9,6 @@ else
source /usr/share/linux-infosec-setupper/common.sh
fi
TEXTDOMAIN=linux-infosec-setupper-back_auditd
# make temporary files not accessible to non-root
# like auditd config is not accessible
umask 0077

@ -26,6 +26,7 @@ error() {
echo '' 1>&2
}
TEXTDOMAIN=linux-infosec-setupper
# detect running from git tree
if [ -f ./common.sh ] && [ -f "$0" ]
then

@ -6,8 +6,10 @@ set -e
if [ -f ./common.sh ] && [ -f "$0" ]
then
source common.sh
source back_pwquality.sh
else
source /usr/share/linux-infosec-setupper/common.sh
source "${SHARE_DIR_PWQUALITY}/back_pwquality.sh"
fi
PWQUALITY_FRONT=1
@ -34,7 +36,7 @@ done
_tag1="<span weight='bold'>"
_tag2="</span>"
var="$(yad --title=$"linux-infosec-setupper" --form \
var="$(yad --title="linux-infosec-setupper: pwquality" --form \
--text-align=center \
--bool-fmt=T \
--text=$"<span size='xx-large' weight='bold'>Password policies setup</span>" \
@ -69,7 +71,7 @@ var="$(yad --title=$"linux-infosec-setupper" --form \
--field=$"${_tag1}Value (retry)${_tag2}:NUM" "$retry:0..9999:1" \
--field=$"Check whether the words longer than 3 characters from the GECO field of passwd::LBL" "!" \
--field=$"Status (gecoscheck):CHK" "$gecoscheck" \
--field=$"Check whether the password macthices a word in a dictionary::LBL" "!" \
--field=$"Check whether the password matches a word in a dictionary::LBL" "!" \
--field=$"Status (dictcheck):CHK" "$dictcheck" \
--field=$"Check whether the password contains the user name in some form::LBL" "!" \
--field=$"Status (usercheck):CHK" "$usercheck" \
@ -115,5 +117,4 @@ done <<<"$var" | sed '/^$/d' | \
;17s/^/--enforce_for_root /
;18s/^/--local_users_only /' | tr '\n' ' ')"
source "${SHARE_DIR_PWQUALITY}/back_pwquality.sh"
_mk_pwquality_conf $var2 > "${DESTDIR}/etc/security/pwquality.conf" || { error $"Unable to write to file %s" "${DESTDIR}/etc/security/pwquality.conf"; exit 1; }

@ -1,7 +1,7 @@
Name: linux-infosec-setupper
Summary: CLI and GUI utilities to setup information security-related parts of Linux
License: GPLv3
Group: System/Base
Group: System/Configuration/Other
Version: 0.1
Release: 1
Source0: %{name}-%{version}.tar.gz
@ -17,7 +17,7 @@ BuildRequires: gettext
%package common
Summary: Common parts for subpackages of %{name}
Group: System/Base
Group: System/Configuration/Other
Requires: awk
Requires: bash
Requires: coreutils
@ -31,12 +31,13 @@ Common parts for subpackages of %{name}
%dir %{_datadir}/linux-infosec-setupper
%{_datadir}/linux-infosec-setupper/common.sh
%dir %attr(0700,root,root) /var/lib/linux-infosec-setupper
%lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/linux-infosec-setupper.mo
#-----------------------------------------------------------------------------------
%package auditd-cli
Summary: CLI and backend to setup auditd configs
Group: System/Base
Group: System/Configuration/Other
Requires: %{name}-common = %{version}-%{release}
Requires: audit
@ -48,11 +49,52 @@ CLI and backend to setup auditd configs
%dir %{_datadir}/linux-infosec-setupper/audit
%{_datadir}/linux-infosec-setupper/audit/back_auditd.sh
%dir %attr(0700,root,root) /var/lib/linux-infosec-setupper/audit
%lang(ru) %{_datadir}/locale/ru/LC_MESSAGES/linux-infosec-setupper-back_auditd.mo
%ghost /var/lib/linux-infosec-setupper/audit/auditd-conf.sh
#-----------------------------------------------------------------------------------
%package pwquality-cli
Summary: CLI and backend to setup pwquality configs
Group: System/Configuration/Other
Requires: %{name}-common = %{version}-%{release}
%if 0%{mdvver}
Requires: pam_pwquality
Requires: libpwquality-common
%else
# redhat
Requires: libpwquality
%endif
%description pwquality-cli
CLI and backend to setup pwquality configs
%files pwquality-cli
%{_sbindir}/linux-infosec-setupper-pwquality-cli
%dir %{_datadir}/linux-infosec-setupper/pwquality
%{_datadir}/linux-infosec-setupper/pwquality/back_pwquality.sh
%{_datadir}/linux-infosec-setupper/pwquality/pw_default
%dir %attr(0700,root,root) /var/lib/linux-infosec-setupper/pwquality
%ghost /var/lib/linux-infosec-setupper/pwquality/pw_changed
#-----------------------------------------------------------------------------------
%package pwquality-gui
Summary: GUI to setup pwquality configs
Group: System/Configuration/Other
Requires: %{name}-pwquality-cli = %{version}-%{release}
Requires: yad
Recommends: polkit
%description pwquality-gui
GUI to setup pwquality configs
%files pwquality-gui
%{_sbindir}/linux-infosec-setupper-pwquality-gui
%{_bindir}/linux-infosec-setupper-pwquality-gui
%{_datadir}/polkit-1/actions/org.nixtux.pkexec.linux-infosec-setupper-pwquality-gui.policy
#-----------------------------------------------------------------------------------
%prep
%autosetup -p1 -c
@ -64,7 +106,9 @@ CLI and backend to setup auditd configs
# ghost files
mkdir -p %{buildroot}/var/lib/linux-infosec-setupper/audit/
mkdir -p %{buildroot}/var/lib/linux-infosec-setupper/pwquality/
touch %{buildroot}/var/lib/linux-infosec-setupper/audit/auditd-conf.sh
touch %{buildroot}/var/lib/linux-infosec-setupper/pwquality/pw_changed
%check
bash -x ./test_back_auditd.sh

1
po/.gitignore vendored

@ -1 +1,2 @@
*.mo
*.pot.2

@ -0,0 +1,6 @@
update-pot:
( cat linux-infosec-setupper.pot ; for i in ../*.sh ; do bash --dump-po-strings $i ; done ) | msguniq > linux-infosec-setupper.pot.2
mv -v linux-infosec-setupper.pot.2 linux-infosec-setupper.pot
update-po:
msgmerge -o ru.po ru.po linux-infosec-setupper.pot

@ -1,78 +0,0 @@
#: ../back_auditd.sh:26
msgid "Entered %s=exec /path/to/script does not contain a path to script"
msgstr ""
#: ../back_auditd.sh:29
msgid "%s=exec* can have only one agrument — path to script, example: %s=exec /path/to/script"
msgstr ""
#: ../back_auditd.sh:34
msgid "Script %s is not executable"
msgstr ""
#: ../back_auditd.sh:40
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:74
msgid "Error creating directory %s"
msgstr ""
#: ../back_auditd.sh:103
msgid "Error copying systemd override file %s to %s"
msgstr ""
#: ../back_auditd.sh:110
msgid "Systemd unit file auditd.service with setted up packet filtering has not passed verification!"
msgstr ""
#: ../back_auditd.sh:111
msgid "The error was:"
msgstr ""
#: ../back_auditd.sh:171
msgid "Directory %s does not exist"
msgstr ""
#: ../back_auditd.sh:187
msgid "Value of %s must be %s or %s"
msgstr ""
#: ../back_auditd.sh:216
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:229
msgid "Parameter %s makes sense only when %s"
msgstr ""
#: ../back_auditd.sh:243
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:256
msgid "Parameter %s makes sense only when %s"
msgstr ""
#: ../back_auditd.sh:271
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:285
msgid "File %s does not exist or is not executable, so %s cannot be set as a dispatcher executable"
msgstr ""
#: ../back_auditd.sh:299
msgid "%s requires %s to be configured"
msgstr ""
#: ../back_auditd.sh:315
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:328
msgid "Parameter %s makes sense only when %s"
msgstr ""
#: ../back_auditd.sh:391
msgid "%s must be an integer between %s and %s"
msgstr ""
#: ../back_auditd.sh:405
msgid "%s must be an integer between %s and %s"
msgstr ""
#: ../back_auditd.sh:427
msgid "Errors occured when trying to understand how to configure auditd"
msgstr ""
#: ../back_auditd.sh:431
msgid "Error creating directory %s"
msgstr ""
#: ../back_auditd.sh:466
msgid "Error creating directory %s"
msgstr ""
#: ../back_auditd.sh:470
msgid "Error writing auditd config file %s"
msgstr ""
#: ../back_auditd.sh:473
msgid "Reboot to apply changes to auditd config"
msgstr ""

@ -1,81 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.4.1\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
"Language: ru\n"
#: ../back_auditd.sh:26
msgid "Entered %s=exec /path/to/script does not contain a path to script"
msgstr "Введенное значение %s=exec /путь/к/скрипту не содержит путь к скрипту"
#: ../back_auditd.sh:29
msgid "%s=exec* can have only one agrument — path to script, example: %s=exec /path/to/script"
msgstr "У %s=exec* может быть только один аргумент — путь к скрипту, например: %s=exec /путь/к/скрипту"
#: ../back_auditd.sh:34
msgid "Script %s is not executable"
msgstr "Скрипт %s не является выполняемым"
#: ../back_auditd.sh:40 ../back_auditd.sh:216 ../back_auditd.sh:243 ../back_auditd.sh:271 ../back_auditd.sh:315
msgid "Possible values of %s are: %s"
msgstr "Возможны следующие значения %s: %s"
#: ../back_auditd.sh:74 ../back_auditd.sh:431 ../back_auditd.sh:466
msgid "Error creating directory %s"
msgstr "Ошибка создания каталога %s"
#: ../back_auditd.sh:103
msgid "Error copying systemd override file %s to %s"
msgstr "Ошибка копирования файла дополнительных настроек systemd %s в %s"
#: ../back_auditd.sh:110
msgid "Systemd unit file auditd.service with setted up packet filtering has not passed verification!"
msgstr "Файл унита systemd auditd.service с настроенной фильтрацией сетевого трафика не прошел проверку на правильность синтаксиса!"
#: ../back_auditd.sh:111
msgid "The error was:"
msgstr "Ошибка была следующей:"
#: ../back_auditd.sh:171
msgid "Directory %s does not exist"
msgstr "Каталог %s не существует"
#: ../back_auditd.sh:187
msgid "Value of %s must be %s or %s"
msgstr "Значением %s должно быть %s или %s"
#: ../back_auditd.sh:229 ../back_auditd.sh:256 ../back_auditd.sh:328
msgid "Parameter %s makes sense only when %s"
msgstr "Параметр %s имеет смысл только когда %s"
#: ../back_auditd.sh:285
msgid "File %s does not exist or is not executable, so %s cannot be set as a dispatcher executable"
msgstr "Файл %s не существует или не является исполняемым, поэтому %s не может быть установлен в качестве диспатчера аудита"
#: ../back_auditd.sh:299
msgid "%s requires %s to be configured"
msgstr "Для %s должен быть настроен %s"
#: ../back_auditd.sh:391 ../back_auditd.sh:405
msgid "%s must be an integer between %s and %s"
msgstr "%s должно быть целым числом от %s до %s"
#: ../back_auditd.sh:427
msgid "Errors occured when trying to understand how to configure auditd"
msgstr "Невозможно понять, как настроить auditd, возникли ошибки"
#: ../back_auditd.sh:470
msgid "Error writing auditd config file %s"
msgstr "Ошибка записи файла настроек auditd %s"
#: ../back_auditd.sh:473
msgid "Reboot to apply changes to auditd config"
msgstr "Перезагрузите систему, чтобы настройки auditd вступили в силу"

@ -0,0 +1,469 @@
msgid ""
msgstr ""
"Project-Id-Version: linux-infosec-setupper\n"
"Report-Msgid-Bugs-To: https://github.com/linux-infosec-setupper/linux-"
"infosec-setupper/issues\n"
"POT-Creation-Date: 2020-11-13 06:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
#: ../back_auditd.sh:32
msgid "Entered %s=exec /path/to/script does not contain a path to script"
msgstr ""
#: ../back_auditd.sh:35
msgid ""
"%s=exec* can have only one agrument — path to script, example: %s=exec /path/"
"to/script"
msgstr ""
#: ../back_auditd.sh:40
msgid "Script %s is not executable"
msgstr ""
#: ../back_auditd.sh:46 ../back_auditd.sh:226 ../back_auditd.sh:253
#: ../back_auditd.sh:281 ../back_auditd.sh:325
msgid "Possible values of %s are: %s"
msgstr ""
#: ../back_auditd.sh:80 ../back_auditd.sh:441 ../back_auditd.sh:478
msgid "Error creating directory %s"
msgstr ""
#: ../back_auditd.sh:111
msgid "Error copying systemd override file %s to %s"
msgstr ""
#: ../back_auditd.sh:118
msgid ""
"Systemd unit file auditd.service with setted up packet filtering has not "
"passed verification!"
msgstr ""
#: ../back_auditd.sh:119
msgid "The error was:"
msgstr ""
#: ../back_auditd.sh:181
msgid "Directory %s does not exist"
msgstr ""
#: ../back_auditd.sh:197
msgid "Value of %s must be %s or %s"
msgstr ""
#: ../back_auditd.sh:239 ../back_auditd.sh:266 ../back_auditd.sh:338
msgid "Parameter %s makes sense only when %s"
msgstr ""
#: ../back_auditd.sh:295
msgid ""
"File %s does not exist or is not executable, so %s cannot be set as a "
"dispatcher executable"
msgstr ""
#: ../back_auditd.sh:309
msgid "%s requires %s to be configured"
msgstr ""
#: ../back_auditd.sh:401 ../back_auditd.sh:415
msgid "%s must be an integer between %s and %s"
msgstr ""
#: ../back_auditd.sh:437
msgid "Errors occured when trying to understand how to configure auditd"
msgstr ""
#: ../back_auditd.sh:482
msgid "Error writing auditd config file %s"
msgstr ""
#: ../back_auditd.sh:485
msgid "Reboot to apply changes to auditd config"
msgstr ""
#: ../back_pwquality.sh:14 ../front_pwquality_cli.sh:22
#: ../front_pwquality.sh:25
msgid "Unable to parse /etc/security/pwquality.conf correctly; execute \\n%s"
msgstr ""
#: ../back_pwquality.sh:59 ../back_pwquality.sh:64 ../back_pwquality.sh:69
#: ../back_pwquality.sh:78 ../back_pwquality.sh:87 ../back_pwquality.sh:92
msgid "The received parameters are not correct. Expected %s, received %s"
msgstr ""
#: ../back_pwquality.sh:59 ../back_pwquality.sh:64 ../back_pwquality.sh:69
#: ../back_pwquality.sh:78 ../back_pwquality.sh:87 ../back_pwquality.sh:92
msgid "0 or 1"
msgstr ""
#: ../common.sh:49
msgid "Argument to %s must be a number"
msgstr ""
#: ../common.sh:58
msgid "Argument to %s must be greater than %s"
msgstr ""
#: ../common.sh:69
msgid "Argument to %s must be a string without spaces"
msgstr ""
#: ../common.sh:83
msgid "Value of %s is empty, set yes or no"
msgstr ""
#: ../common.sh:87
msgid "String %s is not a boolean, set yes or no"
msgstr ""
#: ../common.sh:98
msgid "Value of %s must be a non-negative number"
msgstr ""
#: ../common.sh:105
msgid "%s is not a correct email"
msgstr ""
#: ../front_auditd_cli.sh:17
msgid "This is generator of auditd config"
msgstr ""
#: ../front_auditd_cli.sh:18
msgid "Run as: %s [--parameter value] [--parameter value]"
msgstr ""
#: ../front_auditd_cli.sh:19
msgid "Supported parameters of auditd and their default values are:"
msgstr ""
#: ../front_pwquality_cli.sh:18 ../front_pwquality_cli.sh:19
#: ../front_pwquality_cli.sh:83 ../front_pwquality.sh:19
#: ../front_pwquality.sh:20 ../front_pwquality.sh:87 ../front_pwquality.sh:119
msgid "Unable to write to file %s"
msgstr ""
#: ../front_pwquality_cli.sh:37
msgid "No arguments specified"
msgstr ""
#: ../front_pwquality_cli.sh:42
msgid "Usage: #NAME# --[OPTIONS...]"
msgstr ""
#: ../front_pwquality_cli.sh:43
msgid " example: #NAME# --difok 6"
msgstr ""
#: ../front_pwquality_cli.sh:44
msgid " example: #NAME# d 6"
msgstr ""
#: ../front_pwquality_cli.sh:45
msgid ""
"#NAME# allows you to manage the file configuration for pwquality in the cli "
"option. A GUI version is also available: #NAME2#"
msgstr ""
#: ../front_pwquality_cli.sh:47
msgid " Options:"
msgstr ""
#: ../front_pwquality_cli.sh:48
msgid ""
" d, difok Number of characters in the new password that must "
"not be present in the old password"
msgstr ""
#: ../front_pwquality_cli.sh:49
msgid " m, minlen Minimum acceptable size for the new password"
msgstr ""
#: ../front_pwquality_cli.sh:50
msgid ""
" dc, dcredit The maximum credit for having digits in the new "
"password"
msgstr ""
#: ../front_pwquality_cli.sh:51
msgid ""
" uc, ucredit The maximum credit for having uppercase characters "
"in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:52
msgid ""
" lc, lcredit The maximum credit for having lowercase characters "
"in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:53
msgid ""
" oc, ocredit The maximum credit for having other characters in "
"the new password"
msgstr ""
#: ../front_pwquality_cli.sh:54
msgid ""
" minclass The minimum number of required classes of "
"characters for the new password"
msgstr ""
#: ../front_pwquality_cli.sh:55
msgid ""
" maxrepeat The maximum number of allowed same consecutive "
"characters in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:56
msgid ""
" maxsequence The maximum length of monotonic character "
"sequences in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:57
msgid ""
" maxclassrepeat The maximum number of allowed consecutive "
"characters of the same class in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:58
msgid ""
" geco, gecoscheck Check whether the words longer than 3 characters "
"from the GECOS field of the user's passwd(5) entry are contained in the new "
"password"
msgstr ""
#: ../front_pwquality_cli.sh:59
msgid ""
" dictcheck Check whether the password (with possible "
"modifications) matches a word in a dictionary"
msgstr ""
#: ../front_pwquality_cli.sh:60
msgid ""
" usercheck Check whether the password (with possible "
"modifications) contains the user name in some form"
msgstr ""
#: ../front_pwquality_cli.sh:61
msgid ""
" usersubstr Check whether the password contains a substring of "
"at least N length in some form"
msgstr ""
#: ../front_pwquality_cli.sh:62
msgid ""
" enforcing Reject the password if it fails the checks, "
"otherwise only print the warning"
msgstr ""
#: ../front_pwquality_cli.sh:63
msgid ""
" retry Prompt user at most N times before returning with "
"error"
msgstr ""
#: ../front_pwquality_cli.sh:64
msgid ""
" enforce_for_root The module will return error on failed check even "
"if the user changing the password is root"
msgstr ""
#: ../front_pwquality_cli.sh:65
msgid ""
" local_users_only The module will not test the password quality for "
"users that are not present in the /etc/passwd file"
msgstr ""
#: ../front_pwquality.sh:31
msgid "Unable to set variable %s"
msgstr ""
#: ../front_pwquality.sh:37
msgid "linux-infosec-setupper"
msgstr ""
#: ../front_pwquality.sh:37
msgid "<span size='xx-large' weight='bold'>Password policies setup</span>"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Load defaults!view-refresh:3"
msgstr ""
#: ../front_pwquality.sh:37
msgid "yad-save:0"
msgstr ""
#: ../front_pwquality.sh:37
msgid "yad-close:1"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Number of characters in the new password that must not be present in the old "
"password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (difok)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Minimum acceptable size for the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (minlen)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "The maximum credit for having digits in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (dcredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum credit for having uppercase characters in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (ucredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum credit for having lowercase characters in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (lcredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "The maximum credit for having other characters in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (ocredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The minimum number of required classes of characters for the new password::"
"LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (minclass)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum number of allowed same consecutive charatcers in the new "
"password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxrepeat)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum length of monotonic chatacter sequences in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxsequence)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum number of allowed consecutive characters of the same class in "
"the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxclassrepeat)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Check whether the password contains a substring of at least N length::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (usersubstr)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Prompt the user at most N times before returning error::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (retry)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Check whether the words longer than 3 characters from the GECO field of "
"passwd::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (gecoscheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Check whether the password macthices a word in a dictionary::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (dictcheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Check whether the password contains the user name in some form::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (usercheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Reject the password if it fails the checks::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (enforcing):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Return error on failed check even if the user changing the password is root::"
"LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (enforce_for_root):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Not test the password quality for users that are not present in /etc/passwd::"
"LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (local_users_only):CHK"
msgstr ""

@ -0,0 +1,481 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: https://github.com/linux-infosec-setupper/linux-"
"infosec-setupper/issues\n"
"POT-Creation-Date: 2020-11-13 06:09+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.4.1\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
#: ../back_auditd.sh:32
msgid "Entered %s=exec /path/to/script does not contain a path to script"
msgstr "Введенное значение %s=exec /путь/к/скрипту не содержит путь к скрипту"
#: ../back_auditd.sh:35
msgid ""
"%s=exec* can have only one agrument — path to script, example: %s=exec /path/"
"to/script"
msgstr ""
"У %s=exec* может быть только один аргумент — путь к скрипту, например: "
"%s=exec /путь/к/скрипту"
#: ../back_auditd.sh:40
msgid "Script %s is not executable"
msgstr "Скрипт %s не является выполняемым"
#: ../back_auditd.sh:46 ../back_auditd.sh:226 ../back_auditd.sh:253
#: ../back_auditd.sh:281 ../back_auditd.sh:325
msgid "Possible values of %s are: %s"
msgstr "Возможны следующие значения %s: %s"
#: ../back_auditd.sh:80 ../back_auditd.sh:441 ../back_auditd.sh:478
msgid "Error creating directory %s"
msgstr "Ошибка создания каталога %s"
#: ../back_auditd.sh:111
msgid "Error copying systemd override file %s to %s"
msgstr "Ошибка копирования файла дополнительных настроек systemd %s в %s"
#: ../back_auditd.sh:118
msgid ""
"Systemd unit file auditd.service with setted up packet filtering has not "
"passed verification!"
msgstr ""
"Файл унита systemd auditd.service с настроенной фильтрацией сетевого трафика "
"не прошел проверку на правильность синтаксиса!"
#: ../back_auditd.sh:119
msgid "The error was:"
msgstr "Ошибка была следующей:"
#: ../back_auditd.sh:181
msgid "Directory %s does not exist"
msgstr "Каталог %s не существует"
#: ../back_auditd.sh:197
msgid "Value of %s must be %s or %s"
msgstr "Значением %s должно быть %s или %s"
#: ../back_auditd.sh:239 ../back_auditd.sh:266 ../back_auditd.sh:338
msgid "Parameter %s makes sense only when %s"
msgstr "Параметр %s имеет смысл только когда %s"
#: ../back_auditd.sh:295
msgid ""
"File %s does not exist or is not executable, so %s cannot be set as a "
"dispatcher executable"
msgstr ""
"Файл %s не существует или не является исполняемым, поэтому %s не может быть "
"установлен в качестве диспатчера аудита"
#: ../back_auditd.sh:309
msgid "%s requires %s to be configured"
msgstr "Для %s должен быть настроен %s"
#: ../back_auditd.sh:401 ../back_auditd.sh:415
msgid "%s must be an integer between %s and %s"
msgstr "%s должно быть целым числом от %s до %s"
#: ../back_auditd.sh:437
msgid "Errors occured when trying to understand how to configure auditd"
msgstr "Невозможно понять, как настроить auditd, возникли ошибки"
#: ../back_auditd.sh:482
msgid "Error writing auditd config file %s"
msgstr "Ошибка записи файла настроек auditd %s"
#: ../back_auditd.sh:485
msgid "Reboot to apply changes to auditd config"
msgstr "Перезагрузите систему, чтобы настройки auditd вступили в силу"
#: ../back_pwquality.sh:14 ../front_pwquality_cli.sh:22
#: ../front_pwquality.sh:25
msgid "Unable to parse /etc/security/pwquality.conf correctly; execute \\n%s"
msgstr ""
#: ../back_pwquality.sh:59 ../back_pwquality.sh:64 ../back_pwquality.sh:69
#: ../back_pwquality.sh:78 ../back_pwquality.sh:87 ../back_pwquality.sh:92
msgid "The received parameters are not correct. Expected %s, received %s"
msgstr "полученные параметры неправильны. Ожидалось %s, а получено %s"
#: ../back_pwquality.sh:59 ../back_pwquality.sh:64 ../back_pwquality.sh:69
#: ../back_pwquality.sh:78 ../back_pwquality.sh:87 ../back_pwquality.sh:92
msgid "0 or 1"
msgstr "0 или 1"
#: ../common.sh:49
msgid "Argument to %s must be a number"
msgstr "Значением %s должно быть число"
#: ../common.sh:58
#, fuzzy
msgid "Argument to %s must be greater than %s"
msgstr "Значение %s должно быть больше значения %s"
#: ../common.sh:69
msgid "Argument to %s must be a string without spaces"
msgstr "Значение %s должно быть строкой без пробелов"
#: ../common.sh:83
msgid "Value of %s is empty, set yes or no"
msgstr "Значение %s пусто, задайте yes или no"
#: ../common.sh:87
msgid "String %s is not a boolean, set yes or no"
msgstr "Строка %s не является булеановым значением, задайте yes или no"
#: ../common.sh:98
msgid "Value of %s must be a non-negative number"
msgstr "Значение %s должно быть целым числом больше нуля"
#: ../common.sh:105
msgid "%s is not a correct email"
msgstr "%s не является валидным адресом электропочты"
#: ../front_auditd_cli.sh:17
msgid "This is generator of auditd config"
msgstr "Это генератор конфига auditd"
#: ../front_auditd_cli.sh:18
msgid "Run as: %s [--parameter value] [--parameter value]"
msgstr "Запускайте его так: %s [--параметр значение] [--параметр значение]"
#: ../front_auditd_cli.sh:19
msgid "Supported parameters of auditd and their default values are:"
msgstr "Поддерживаемые параметров auditd и их значения по умолчанию таковы:"
#: ../front_pwquality_cli.sh:18 ../front_pwquality_cli.sh:19
#: ../front_pwquality_cli.sh:83 ../front_pwquality.sh:19
#: ../front_pwquality.sh:20 ../front_pwquality.sh:87 ../front_pwquality.sh:119
msgid "Unable to write to file %s"
msgstr "Невозможно записать в файл %s"
#: ../front_pwquality_cli.sh:37
msgid "No arguments specified"
msgstr "Не передано никаких аргументов"
#: ../front_pwquality_cli.sh:42
msgid "Usage: #NAME# --[OPTIONS...]"
msgstr "Использование: #NAME# --[OPTIONS...]"
#: ../front_pwquality_cli.sh:43
msgid " example: #NAME# --difok 6"
msgstr " пример: #NAME# --difok 6"
#: ../front_pwquality_cli.sh:44
msgid " example: #NAME# d 6"
msgstr " пример: #NAME# d 6"
#: ../front_pwquality_cli.sh:45
msgid ""
"#NAME# allows you to manage the file configuration for pwquality in the cli "
"option. A GUI version is also available: #NAME2#"
msgstr ""
"#NAME# позволяет управлять конфигом pwquality через cli. "
"Также доступна гарфическая версия: #NAME2#"
#: ../front_pwquality_cli.sh:47
msgid " Options:"
msgstr " Параметры:"
#: ../front_pwquality_cli.sh:48
msgid ""
" d, difok Number of characters in the new password that must "
"not be present in the old password"
msgstr ""
#: ../front_pwquality_cli.sh:49
msgid " m, minlen Minimum acceptable size for the new password"
msgstr ""
#: ../front_pwquality_cli.sh:50
msgid ""
" dc, dcredit The maximum credit for having digits in the new "
"password"
msgstr ""
#: ../front_pwquality_cli.sh:51
msgid ""
" uc, ucredit The maximum credit for having uppercase characters "
"in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:52
msgid ""
" lc, lcredit The maximum credit for having lowercase characters "
"in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:53
msgid ""
" oc, ocredit The maximum credit for having other characters in "
"the new password"
msgstr ""
#: ../front_pwquality_cli.sh:54
msgid ""
" minclass The minimum number of required classes of "
"characters for the new password"
msgstr ""
#: ../front_pwquality_cli.sh:55
msgid ""
" maxrepeat The maximum number of allowed same consecutive "
"characters in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:56
msgid ""
" maxsequence The maximum length of monotonic character "
"sequences in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:57
msgid ""
" maxclassrepeat The maximum number of allowed consecutive "
"characters of the same class in the new password"
msgstr ""
#: ../front_pwquality_cli.sh:58
msgid ""
" geco, gecoscheck Check whether the words longer than 3 characters "
"from the GECOS field of the user's passwd(5) entry are contained in the new "
"password"
msgstr ""
#: ../front_pwquality_cli.sh:59
msgid ""
" dictcheck Check whether the password (with possible "
"modifications) matches a word in a dictionary"
msgstr ""
#: ../front_pwquality_cli.sh:60
msgid ""
" usercheck Check whether the password (with possible "
"modifications) contains the user name in some form"
msgstr ""
#: ../front_pwquality_cli.sh:61
msgid ""
" usersubstr Check whether the password contains a substring of "
"at least N length in some form"
msgstr ""
#: ../front_pwquality_cli.sh:62
msgid ""
" enforcing Reject the password if it fails the checks, "
"otherwise only print the warning"
msgstr ""
#: ../front_pwquality_cli.sh:63
msgid ""
" retry Prompt user at most N times before returning with "
"error"
msgstr ""
#: ../front_pwquality_cli.sh:64
msgid ""
" enforce_for_root The module will return error on failed check even "
"if the user changing the password is root"
msgstr ""
#: ../front_pwquality_cli.sh:65
msgid ""
" local_users_only The module will not test the password quality for "
"users that are not present in the /etc/passwd file"
msgstr ""
#: ../front_pwquality.sh:31
msgid "Unable to set variable %s"
msgstr "Невозможно установить переменную %s"
#: ../front_pwquality.sh:37
msgid "linux-infosec-setupper"
msgstr ""
#: ../front_pwquality.sh:37
msgid "<span size='xx-large' weight='bold'>Password policies setup</span>"
msgstr "<span size='xx-large' weight='bold'>Настройка политики сложности паролей</span>"
#: ../front_pwquality.sh:37
msgid "Load defaults!view-refresh:3"
msgstr "Сбросить настройки!view-refresh:3"
#: ../front_pwquality.sh:37
msgid "yad-save:0"
msgstr ""
#: ../front_pwquality.sh:37
msgid "yad-close:1"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Number of characters in the new password that must not be present in the old "
"password::LBL"
msgstr ""
"Количество символов из нового пароля, которых не должно быть в старом пароле::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (difok)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Minimum acceptable size for the new password::LBL"
msgstr "Минимальный допустимый размер нового пароля::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (minlen)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "The maximum credit for having digits in the new password::LBL"
msgstr "Максималньый кредит на цифры в новом пароле::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (dcredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum credit for having uppercase characters in the new password::LBL"
msgstr "Максимальный кредит на заглавные буквы в новом пароле::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (ucredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum credit for having lowercase characters in the new password::LBL"
msgstr "Максимальный кредит на строчные буквы в новом пароле::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (lcredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "The maximum credit for having other characters in the new password::LBL"
msgstr "Максимальный кредит на осталньые символы в новом пароле"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (ocredit)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The minimum number of required classes of characters for the new password::"
"LBL"
msgstr "Минимальное необходимое кол-во типов символов в новом пароле::LBL"
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (minclass)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum number of allowed same consecutive charatcers in the new "
"password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxrepeat)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum length of monotonic chatacter sequences in the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxsequence)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"The maximum number of allowed consecutive characters of the same class in "
"the new password::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (maxclassrepeat)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Check whether the password contains a substring of at least N length::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (usersubstr)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Prompt the user at most N times before returning error::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "${_tag1}Value (retry)${_tag2}:NUM"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Check whether the words longer than 3 characters from the GECO field of "
"passwd::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (gecoscheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Check whether the password macthices a word in a dictionary::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (dictcheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Check whether the password contains the user name in some form::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (usercheck):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Reject the password if it fails the checks::LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (enforcing):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Return error on failed check even if the user changing the password is root::"
"LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (enforce_for_root):CHK"
msgstr ""
#: ../front_pwquality.sh:37
msgid ""
"Not test the password quality for users that are not present in /etc/passwd::"
"LBL"
msgstr ""
#: ../front_pwquality.sh:37
msgid "Status (local_users_only):CHK"
msgstr ""

@ -0,0 +1,2 @@
#!/bin/sh
pkexec /usr/sbin/linux-infosec-setupper-pwquality-gui $@

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>NixTux</vendor>
<vendor_url>https://nixtux.ru</vendor_url>
<icon_name>gcr-key</icon_name>
<action id="org.nixtux.pkexec.linux-infosec-setupper-pwquality-gui">
<description>GUI to setup pwquality configs</description>
<description xml:lang="ru">Графический инструмент для настройки политики сложности паролей</description>
<message>Enter password to run it</message>
<message xml:lang="ru">Введите пароль для запуска</message>
<defaults>
<allow_any>auth_admin</allow_any>
<allow_inactive>auth_admin</allow_inactive>
<allow_active>auth_admin</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/linux-infosec-setupper-pwquality-gui</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

@ -29,9 +29,9 @@ _main(){
[ "$(md5sum "${DESTDIR}"/etc/systemd/system/auditd.service.d/90-linux-infosec-setupper-auditd-firewall.conf | awk '{print $1}')" = 27f8c93280d21e8b0d4b399ac234b663 ] ;} || \
{ echo failed test 2; failed="$((++failed))"; }
_mk_auditd_config --log_group root || { echo failed test 3; failed="$((++failed))"; }
[ "$(md5sum "${VAR_DIR_AUDIT}/auditd-conf.sh" | awk '{print $1}')" = 650f41086f25b6c0736bdc0323ca6267 ] || { echo failed test 4; failed="$((++failed))"; }
[ "$(md5sum "${VAR_DIR_AUDIT}/auditd-conf.sh" | awk '{print $1}')" = 83a7bb6d8d24378e398d597430e27f0e ] || { echo failed test 4; failed="$((++failed))"; }
_mk_auditd_config || { echo failed test 5; failed="$((++failed))"; }
[ "$(md5sum "${VAR_DIR_AUDIT}/auditd-conf.sh" | awk '{print $1}')" = 650f41086f25b6c0736bdc0323ca6267 ] || { echo failed test 6; failed="$((++failed))"; }
[ "$(md5sum "${VAR_DIR_AUDIT}/auditd-conf.sh" | awk '{print $1}')" = 83a7bb6d8d24378e398d597430e27f0e ] || { echo failed test 6; failed="$((++failed))"; }
! _mk_auditd_config --local_events xuy || { echo failed test 7; failed="$((++failed))"; }
_mk_auditd_config --systemd-firewalling-params "--IPAddressDeny any --IPAddressAllow 192.168.10.1/24 --IPAddressAllow 192.168.20.1" || { echo failed test 8; failed="$((++failed))"; }
[ "$(md5sum "${DESTDIR}"/etc/systemd/system/auditd.service.d/90-linux-infosec-setupper-auditd-firewall.conf | awk '{print $1}')" = 27f8c93280d21e8b0d4b399ac234b663 ] || { echo failed test 9; failed="$((++failed))"; }

Loading…
Cancel
Save