Tag Archives: debian

How to install pwmanager in Debian sid

As you may know, there is a great utility for storing passwords in encrypted form called pwmanager. The project seems discontinued now.

So, how to install it on Debian/Ubuntu?

Firstly be sure to install kdelibs-dev:

$ apt-get install kdelibs-dev

then grab the latest source archive from  http://sourceforge.net/projects/passwordmanager/files/ (at the moment of writing it is pwmanager-1.2.4.tar.bz2)

Decompress it:

$ tar xvjf pwmanager-1.2.4.tar.bz2

Go into the newly created directory:

$ cd pwmanager-1.2.4

And run:

$ ./configure
$ make
$ make intall

Should work, but did not work for me. I got this kind of errors at compilation time:

base64.cpp: In constructor ‘Base64::Base64()’:
base64.cpp:59: error: ‘exit’ was not declared in this scope

binentrygen.cpp: In member function ‘void BinEntryGen::decode(const PwMDataItem&, QByteArray*, BinEntryGen::DataType*)’:
binentrygen.cpp:36: error: ‘strtol’ was not declared in this scope

compressbzip2.cpp: In member function ‘bool CompressBzip2::compress(std::string*)’:
compressbzip2.cpp:36: error: ‘memcpy’ was not declared in this scope

main.cpp: In member function ‘virtual int PwMApplication::newInstance()’:
main.cpp:34: error: ‘EXIT_SUCCESS’ was not declared in this scope

serializer.cpp: In member function ‘bool Serializer::extractEntry(const QDomNode&, PwMDataItem*)’:
serializer.cpp:303: error: ‘strtol’ was not declared in this scope

To solve them, copy the next content into a file, say, /tmp/pwmanager.patch:

Only in pwmanager-1.2.4-patched/pwmanager: addentrywnd.cpp                    
Only in pwmanager-1.2.4-patched/pwmanager: advcommedit.cpp                    
diff -crB pwmanager-1.2.4/pwmanager/base64.cpp pwmanager-1.2.4-patched/pwmanager/base64.cpp
*** pwmanager-1.2.4/pwmanager/base64.cpp        2005-11-06 03:16:51.000000000 +0200        
--- pwmanager-1.2.4-patched/pwmanager/base64.cpp        2010-01-31 15:36:39.000000000 +0200
*** 43,48 ****                                                                             
--- 43,49 ----                                                                             
  #include "base64.h"                                                                      
  #include "pwmexception.h"                                                                
+ #include <stdlib.h>                                                                      
  static const char prtcode[] =                                                            
diff -crB pwmanager-1.2.4/pwmanager/binentrygen.cpp pwmanager-1.2.4-patched/pwmanager/binentrygen.cpp
*** pwmanager-1.2.4/pwmanager/binentrygen.cpp   2005-11-06 03:16:51.000000000 +0200                  
--- pwmanager-1.2.4-patched/pwmanager/binentrygen.cpp   2010-01-31 15:36:39.000000000 +0200          
*** 12,17 ****                                                                                       
--- 12,19 ----                                                                                       
  #include "binentrygen.h"                                                                           
  #include "base64.h"                                                                                
  #include "pwmexception.h"                                                                          
+ #include <cstring>                                                                                 
+ #include <cstdlib>                                                                                 
  void BinEntryGen::encode(const QByteArray &data,                                                   
diff -crB pwmanager-1.2.4/pwmanager/compressbzip2.cpp pwmanager-1.2.4-patched/pwmanager/compressbzip2.cpp
*** pwmanager-1.2.4/pwmanager/compressbzip2.cpp 2005-11-06 03:16:50.000000000 +0200                      
--- pwmanager-1.2.4-patched/pwmanager/compressbzip2.cpp 2010-01-31 15:36:39.000000000 +0200              
*** 10,16 ****                                                                                           
  #include "compressbzip2.h"                                                                             
  #include <stdlib.h>                                                                                    
  #define BZ_NO_STDIO                                                                                    
--- 10,16 ----                                                                                           
  #include "compressbzip2.h"                                                                             
! #include <string.h>                                                                                    
  #include <stdlib.h>                                                                                    
  #define BZ_NO_STDIO                                                                                    
Only in pwmanager-1.2.4-patched/pwmanager: configwnd.cpp                                                 
Only in pwmanager-1.2.4-patched/pwmanager: findwnd.cpp                                                   
diff -crB pwmanager-1.2.4/pwmanager/main.cpp pwmanager-1.2.4-patched/pwmanager/main.cpp                  
*** pwmanager-1.2.4/pwmanager/main.cpp  2005-11-06 03:16:51.000000000 +0200                              
--- pwmanager-1.2.4-patched/pwmanager/main.cpp  2010-01-31 15:36:39.000000000 +0200                      
*** 13,18 ****                                                                                           
--- 13,20 ----                                                                                           
  #include <kaboutdata.h>                                                                                
  #include <klocale.h>                                                                                   
  #include <kstandarddirs.h>                                                                             
+ #include <cstdlib>                                                                                     
+ #include <cstring>                                                                                     
  #include "pwmexception.h"
  #include "pwminit.h"
Only in pwmanager-1.2.4-patched/pwmanager: pwgenwnd.cpp
diff -crB pwmanager-1.2.4/pwmanager/serializer.cpp pwmanager-1.2.4-patched/pwmanager/serializer.cpp
*** pwmanager-1.2.4/pwmanager/serializer.cpp    2005-11-06 03:16:50.000000000 +0200
--- pwmanager-1.2.4-patched/pwmanager/serializer.cpp    2010-01-31 15:36:39.000000000 +0200
*** 12,17 ****
--- 12,19 ----
  #include "serializer.h"
  #include "configuration.h"
  #include "pwmexception.h"
+ #include <cstring>
+ #include <cstdlib>

  /* enable/disable serializer debugging (0/1) */
Only in pwmanager-1.2.4-patched/pwmanager: subtbledit.cpp

Now repeat the steps with ./configure, make, make install.

That’s all.

Cum să faci downgrade la un pachet în Debian sau Ubuntu

Uneori mai fac şmecheria de a schimba repozitoriile în Ubuntu, în loc de hardy schimb în jaunty, asta pentru a instala versiunea mai nouă a unor programe. Din această cauză, uneori apar probleme, că se instalează dependinţe mai noi, şi când încerc deja să instalez vreo aplicaţie din repozitoriile lui hardy, sistemus spune că depinde de o versiune mai veche a unei dependinţe, şi nu poate instala.

Când apar asemenea probleme, trebuie să instalăm versiunea aceea veche. Iată cum:

$ apt-cache showpkg perl-base

(asta pentru pachetul perl-base).

va afişa următoarele:

5.10.0-23 - perlapi-5.10.0 perl5-base libxsloader-perl libscalar-list-utils-perl
5.10.0-19 - perlapi-5.10.0 perl5-base libxsloader-perl libscalar-list-utils-perl

Să zicem că pe noi ne interesează versiunea 5.10.0-19. Facem următoarele:

$ sudo aptitude install perl-base=5.10.0-19

Vedeţi bine, am pus numele pachetului (perl-base), semnul egal (=) şi versiunea care mă interesează.

Missing mysqld.sock on Ubuntu/Debian systems [solved]

I had a problem today, with the MySQL on one system claiming that:

Check that mysqld is running and that the socket: ‘/var/run/mysqld/mysqld.sockexists!

After google-ing a little, I didn’t find a solution to solve my problem. But finally I solved the problem. Here is the solution:

1. Check the ownership and permisions of /var/run/mysqld/

# ls -l /var/run/ | grep mysqld

It must be of the user mysql, and the group root.

2. Make a backup of the my.cnf (as root) :

# sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.back

3. Reconfigure Mysql-server:

# dpkg-reconfigure mysql-server-5.0

Provide the desired root password, and… There you go (of course you can edit the newly created my.cnf, to suit your needs).

Cum sa instalam OpenVAS-ul

Acei care se ocupa cu securitatea sistemelor informationale cu siguranta au auzit de Nessus. Candva era, probabil, cel mai bun program pentru audit in securitatea serverelor. Era cu sursa libera, si era gratuit, pana la momentul cand compania patroana a inchis sursele. Acum pentru a folosi acest program, trebuie sa platesti o taxa de subscriptie, care se ridica la ordinul miilor de dolari anual. Desigur, nu orice sysadmin isi poate permite asemenea placere.
Vestea buna este ca exista un instrument asemanator, care se bazeaza pe sursele mai vechi ale lui nessus (care erau libere), doar ca comunitatea le-a imbunatatit, si continua sa le perfectioneze. Acest instrument se cheama OpenVAS (Open Vulnerability Assestment System). I-l gasiti pe site-ul oficial: http://www.openvas.org/ , cat si in repozitorii.
Fiecare sysadmin e obligat sa-l aiba pe OpenVPN in dotare, si orice sysadmin care Citește în continuare

%d blogeri au apreciat: