Portál AbcLinuxu, 5. května 2024 21:03


Dotaz: bastille hardening debian

1.2.2010 23:28 adrinko | skóre: 22
bastille hardening debian
Přečteno: 263×
Odpovědět | Admin
Nahodil som Bastille na debian ale ked ho chcem spustit (manu - debian - aplikacie - system) tak sa zda, ze sa sice bastille spusta, ale nakoniec nevykukne ziadne okno a ani na liste neni ziadne okno minimalizovane.

ako sa da spustit teda bastille?

vdaka
Nástroje: Začni sledovat (2) ?Zašle upozornění na váš email při vložení nového komentáře.

Odpovědi

Fuky avatar 1.2.2010 23:56 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian
Odpovědět | | Sbalit | Link | Blokovat | Admin

Spusť si ho ručně z terminálu, stderr nám poví víc.

$ apt-file show bastille |grep init.d
bastille: /etc/init.d/bastille-firewall
$ apt-file show bastille |grep sbin
bastille: /sbin/bastille-firewall-reset
bastille: /sbin/bastille-firewall-schedule
bastille: /sbin/bastille-netfilter
bastille: /usr/sbin/AutomatedBastille
bastille: /usr/sbin/BastilleBackEnd
bastille: /usr/sbin/BastilleChooser
bastille: /usr/sbin/InteractiveBastille
bastille: /usr/sbin/RevertBastille
bastille: /usr/sbin/UndoBastille
bastille: /usr/sbin/bastille
-- RÁMO: psí tábor , ETriatlon: Výuka plavání
2.2.2010 13:44 adrinko | skóre: 22
Rozbalit Rozbalit vše Re: bastille hardening debian
spustil som to v terminali a vypisalo:
$ apt-file show bastille |grep init.d
bastille: /etc/init.d/bastille-firewall
$ apt-file show bastille |grep sbin
bastille: /sbin/bastille-firewall-reset
bastille: /sbin/bastille-firewall-schedule
bastille: /sbin/bastille-netfilter
bastille: /usr/sbin/AutomatedBastille
bastille: /usr/sbin/BastilleBackEnd
bastille: /usr/sbin/BastilleChooser
bastille: /usr/sbin/InteractiveBastille
bastille: /usr/sbin/RevertBastille
bastille: /usr/sbin/UndoBastille
bastille: /usr/sbin/bastille
2.2.2010 13:56 adrinko | skóre: 22
Rozbalit Rozbalit vše Re: bastille hardening debian
hm, tak som v terminali spustil bastille a napisalo, ze nema modul tk
nainstaloval som teda aptget install perl-tk

a zase mi napisalo, ze nepodporovany system DB5.0

co teraz?
Fuky avatar 2.2.2010 14:08 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian
# bastille
WARNING: /usr/bin/perl cannot find Perl module Tk.
         The above module(s) is/are required to correctly display
         the Bastille User Interface.  If you are unable to find a
         pre-compiled module for your OS, they can be found at:
           http://www.cpan.org/modules/01modules.index.html
         If you installed the modules in another installation of
         perl besides the one listed in the error message, you may
         override Bastille's search path by setting the
         $CORRECT_PERL_PATH environment variable to the directory
         that the desired perl binary is located in.
         If you don't want to use the default X11 interface then
         run 'bastille -c'. For more information on available interfaces
         see bastille(1m) or run 'bastille -h'
# aptitude install perl-tk
# bastille
ERROR:   'DB5.0' is not a supported operating system.
         Valid operating system versions are as follows:
         'DB2.2' 'DB3.0' 'DB3.1' 'DB4.0' 'RH6.0'
         'RH6.1' 'RH6.2' 'RH7.0' 'RH7.1' 'RH7.2'
         'RH7.3' 'RH8.0' 'RH9' 'MN6.0' 'MN6.1'
         'MN7.0' 'MN7.1' 'MN7.2' 'MN8.0' 'MN8.1'
         'MN8.2' 'HP-UX11.00' 'HP-UX11.11' 'HP-UX11.22' 'HP-UX11.23'
         'SE7.2' 'SE7.3' 'SE8.0' 'TB7.0' 'OSX10.2.0'
         'OSX10.2.1' 'OSX10.2.2' 'OSX10.2.3' 'OSX10.2.4'
ERROR:   Invalid argument list:
         Usage: bastille [ -b | -c | -r | -x [ --os version ] ]
         -b : use a saved config file to apply changes
              directly to system
         -c : use the Curses (non-X11) TUI
         -r : revert all Bastille changes to-date
         -x : use the Perl/Tk (X11) GUI
         --os version : ask all questions for the given operating system
                        version.  e.g. --os RH6.0

Vypadá to, že není korektně připraven balíček pro Lennyho.

Fuky avatar 2.2.2010 14:10 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian
Fuky avatar 2.2.2010 14:37 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian

Řešení je použít novější verzi z testingu:

# vim /etc/apt/sources.list
deb http://ftp.de.debian.org/debian testing main non-free contrib restricted
# aptitude update
# aptitude install bastille=1:3.0.9-12.1
3.2.2010 13:06 adrinko | skóre: 22
Rozbalit Rozbalit vše Re: bastille hardening debian
pouzil som novsiu verziu a spustil cez terminal a vyhodilo toto:
NOTE:    Valid display found; defaulting to Tk (X) interface.
NOTE:    Using Tk user interface module.
NOTE:    Only displaying questions relevant to the current configuration.
NOTE:    Bastille is scanning the system configuration...
NOTE:    This appears to be your first interactive run -- creating a new
         config file.No protocol specified
couldn't connect to display ":0.0" at /usr/lib/perl5/Tk/MainWindow.pm line 55.
MainWindow->new() at /usr/share/perl5/Bastille_Tk.pm line 126
Fuky avatar 3.2.2010 13:39 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian

Kde a pod jakým uživatelem bastille spouštíš? Evidentně nemáš spuštěná X na :0.0 tj. nespustíš ani žádnou jinou X-ovou aplikaci viz. příklady níže:

$ cat ./example.pl
#!/usr/bin/perl

use Tk;

sub finito{
    exit;
}

my $window = MainWindow->new;
$window->title("Test");
$window->Button(-text => "This is the quit button ", -command => \&finito )->pack;
MainLoop;
$ chmod +x example.pl
$ DISPLAY=:0.1 ./example.pl
couldn't connect to display "0.1" at /usr/lib/perl5/Tk/MainWindow.pm line 55.
MainWindow->new() at ./example.pl line 9
$ DISPLAY=:0.1 xterm
xterm Xt error: Can't open display: :0.1

BTW: Používáš doufám příkaz sux místo su?

3.2.2010 16:39 adrinko | skóre: 22
Rozbalit Rozbalit vše Re: bastille hardening debian
uups, pouzival som su. akym prikazom by som to teda mal spustit terminali? sorry za blbe dotazy, linux pouzivam len par dni.
Fuky avatar 3.2.2010 16:51 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian

  • máš spuštěná X pod normálním uživatelem
  • spustíš v nich terminál
  • staneš se rootem pomocí sux (wrapper around su which will transfer your X credentials)
  • nyní v tomto terminálu pod rootem spustíš bastille

Fuky avatar 2.2.2010 13:58 Fuky | skóre: 52 | blog: 4u
Rozbalit Rozbalit vše Re: bastille hardening debian
Příkazy byly jen jako ukázka jak zjistíš zda-li balíček obsahuje nějaký init skript a kde se spouští programy z balíčku. Tuším, že z menu se Ti spouští /usr/sbin/bastille, zkus ho tedy spustit jako root na příkazové řádce a napiš co vypíše. Také by bylo dobré si přešíst manuál a zjistit co vlastně všechny programy v sbin z balíčku bastille umí a co po nich chceš vlastně Ty.

Založit nové vláknoNahoru

Tiskni Sdílej: Linkuj Jaggni to Vybrali.sme.sk Google Del.icio.us Facebook

ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.