Oleg Kourapov




I'm doing 28 things
 
Recent entries
add features to my home server
Generate CrackLib word library on Ubuntu Linux 2 years ago

Last night I tried to install CrackLib on my home server running Ubuntu 6.10 Edgy Eft distro. If you don’t know what CrackLib does, it is a library that may (and should) be used by security-concious applications to prevent users from choosing passwords that are too simple (and thus could be guessed or easily cracked by brute-force attack). And for those who think this is not an important issue, Bruce Schneier, well-known security expert, has posted in his blog the list of top 20 passwords including such favorites as abc123, 123abc, myspace1, and the single most-used key, password1!

I proceeded as usual:
$ sudo apt-get install cracklib2
The catch is: for some reason Ubuntu doesn’t tell you what to do next! It doesn’t provide you with a word list, doesn’t create a dictionary required to use cracklib during installation sequence, and even man cracklib is pretty sparse on info.However, it’s all there, you just have to know where to look for it! After some good old trial’n’error I was able to find the way to do it myself. So here goes:
install cracklib-runtime and add any of the localized wordlist packages to taste – wamerican, wbritish, wfrench, etc (run apt-get install wordlist for the full list):
$ sudo apt-get install cracklib-runtime wbritish
[optional] download extra lists (e.g. at COTSE’s Word Lists) and put them to /usr/share/dict directory:
$ sudo mv /path/to/downloaded/file /usr/share/dict
generate CrackLib dictionary from downloaded word lists:
$ sudo update-cracklib /var/cache/cracklib/cracklib_dict
This will create files named cracklib_dict.hwm, cracklib_dict.pwd and cracklib_dict.pwi in /var/cache/cracklib/ directory – which is exactly where CrackLib expects them to be. And that’s it! Wish this info was there in the first place…

You can now check if anything went as expected by running crack_teststr – it will ask you to enter dictionary words and tell you if they exist or not (Ctrl + C to finish).



Contribute to an open source software project
Download updated Instiki image for Mac OS X 4 years ago

I installed InstikiWiki clone on my Mac about 6 months ago and been using it ever since as my personal knowledge base, notepad and GTD tool – pretty much like any other Wiki/Instiki user. I liked it more than other clones because of ease of installation on my iBook – it came as a self-contained DMG-image with one file inside that I had to drag into my ‘Applications’ folder, double-click it – et voila!

Alas, the latest version of Mac OS X .dmg distribution available from Instiki site is 0.9.2 which is several releases older than current 0.10.2. While there are some instructions available to upgrade they are however not accurate and clear enough.

So I fired up my XCode, opened the project file (it comes in every instiki tarball, you can find it in `natives/osx/desktop_launcher` folder) and tried to do a no-brainer compilation which failed at once. I changed paths here and there, threw in missing folders and files, copied broken .NIB-file from the one included with v0.9.2 and clicked the ‘Build’ button. In a minute or two I had a native working Mac OS X application, ready to replace my aging Instiki.app. I’ve packaged it in a handy DMG format for your pleasure – download, install and send any positive or negative feedback to my email: ok AT 2sheds DOT ru.

BTW, if there are any artists among you who want this app to have a stylish icon instead of the plain default one or perhaps replace the longish ‘Wiki’ word in main menu with a tiny graphic – feel free to send me your pictures and I’ll do a custom ‘beautified’ build.

N.B. This file has been tested only on Mac OS X 10.4.2 (Tiger) so it is not guaranteed to work on Panther or Jaguar – tell me if you need a compatible version and I’ll try to cross-compile for previous versions of OS X as well.

Download:instiki-0.10.2.dmg



Be a better blogger (read all 3 entries…)
How to install Adobe (Acrobat) Reader 7.0 on Xandros 4 years ago

I’ve been hearing about the much-hyped release of Adobe Reader 7.0 for Linux from everywhere and finally decided to take a look at it myself (I was reluctant to do it because my favorite Linux PDF reader is CVS version of KDE’s stock KPDF). Installing it is no rocket science, really, but closely integrating it with the system is a more difficult task. Here’s my how I accomplished it:

  1. Download latest tarball from ftp.adobe.com
  2. untar it in a temporary directory:
    user@local:~$ cd /tmp; tar zxf /path/to/downloaded/AdbeRdr70_linux_enu.tar.gz
  3. as root, run the included INSTALL script:
    root@local:/tmp# cd AdobeReader; ./INSTALL
  4. read Software License Agreement or skip to next step by pressing Q. Type “accept” and press Enter to proceed to installation.
  5. Enter the path to directory where you want Adobe Reader 7.0 to be installed. However, in this case, to make it play along with previously installed Acrobat Reader 5.0, we’ll put it to /usr/lib/Acrobat7: Enter installation directory for Adobe Reader 7.0.0 [/usr/local/Adobe/Acrobat7.0] /usr/lib/Acrobat7
  6. Agree to create the required directory and installation will continue and (hopefully) exit without errors.
  7. Go to bin/ sub-folder:
    root@local:/tmp# cd /usr/lib/Acrobat7/bin/
  8. Open acroread script with your favorite editor, e.g. using vi:
    root@local:/usr/lib/Acrobat7/bin# vi acroread
  9. Go to line number 17 and comment it out by prefixing its contents with a hash symbol:
    #install_dir=`dirname "$ScriptDirectory"`/Reader
  10. insert the following new line underneath (in fact, anywhere in the beginning of this file):
    install_dir=/usr/lib/Acrobat7
  11. Copy the resulting acroread script to /usr/bin:
    root@local:/usr/lib/Acrobat7/bin# cp acroread /usr/bin
  12. Now browse to Browser/ sub-folder to perform Mozilla and/or Firefox plugin installation:
    root@local:/usr/lib/Acrobat7/bin# cd ../Browser; ./install_browser_plugin
    This will install the browser plugin for acroread.Enter the install directory for Adobe Reader 7.0.0 [/usr/lib/Acrobat7]1. Perform global installation
    2. Perform user-specific installation (Mozilla/Firefox/Netscape)
    Enter your choice [1/2] 1Enter the browser install directory - /usr/lib/mozilla
    The plugin seems to be already installed. Are you sure you want to overwrite ? [y/n] y
    Installation successful. Added the file /usr/lib/mozilla/plugins/nppdf.soDo you want to install another browser ? [y/n] y
    The plugin seems to be already installed. Are you sure you want to overwrite ? [y/n] y
    Enter the browser install directory - /usr/lib/mozilla-firefox
    Installation successful. Added the file /usr/lib/mozilla-firefox/plugins/nppdf.soDo you want to install another browser ? [y/n] n
  13. That’s it! Go to about:plugins and see if there is an entry of “Adobe Reader 7.0” in the list of installed plugins. Also try to launch stand-alone Adobe Reader by pressing Alt+F2 and typing acroread (Enter).

Enjoy!



See all entries ...


 

I want to:
43 Things Login