from small one page howto to huge articles all in one place
 

search text in:





Poll
Which kernel version do you use?





poll results



Last additions:
Disable Anti-Aliasing fonts

Disable Anti-Aliasing fonts

words:

186

views:

6107

userrating:

no votes yet


May 25th. 2007:
Words

491

Views

7051

why adblockers are bad


handy one-liners for sed (Unix stream editor)
Tutorial:

handy one-liners for sed (Unix stream editor)

words:

4078

views:

19774

userrating:

no votes yet


rotating apache logfiles with cronolog

rotating apache logfiles with cronolog

words:

294

views:

7428

userrating:

no votes yet


Druckversion . pdf icon
You are here: System->Security

A Quick and Easy Password Generator

This short tutorial shows you how to quickly generate a list of passwords using /dev/urandom, and uuencode.

Code Listing 1

% dd if=/dev/urandom count=1 2> /dev/null | uuencode -m - | sed -ne 2p | cut -c-8
v1/oVN+S

The options for the cut command indicate the length of the password generated (in this case, 8 characters). This could easily be expanded to generate a whole list of passwords using the for command.

Code Listing 2

% for ((n=0;n<10;n++)); do dd if=/dev/urandom count=1 2> /dev/null | uuencode -m -| sed -ne 2p | cut -c-8; done 
rSQpeNNr 
PesAIgAb 
GUEgoUwT 
U3p+kfqa 
WSgSwgq6 
+9aGihvl 
dYfcaV3b 
guFtI7eZ 
+kzKuW0f 
jJpW/8yO

To create a longer or shorter list, just change the limit in for (in this case 10).

If you want to generate WEP keys for wireless networking, you can use a similar procedure, replacing uuencode with md5sum:

Code Listing 3

% dd if=/dev/urandom count=1 2> /dev/null | md5sum | cut -c-26

aaab69457c239ef1d52617d1fa

Adapted from http://www.gentoo.org/news/en/gwn/20030804-newsletter.xml


rate this article:
current rating: average rating: 2.2 (5 votes) (1=very good 6=terrible)
Your rating:
Very good (1) Good (2) ok (3) average (4) bad (5) terrible (6)

back
comment this article
Please read "Why adblockers are bad". Ärger mit Freenet.de



to the forum.
:
:
other Ads
Stellenangebote
Stellenangebote
für Fach- und
Führungskräfte
www.nachoben.com
Other free services
toURL.org
Shorten long
URLs to short
links like
http://tourl.org/2
tourl.org
.
FeedCollector
Combine various newsfeeds to one customized webpage
www.feedcollector.org
.
Reverse DNS lookup
Find out which hostname(s)
resolve to a
given IP or other hostnames for the server
www.reversednslookup.org
rdf newsfeed | rss newsfeed | Atom newsfeed
- Powered by LeopardCMS - Running on Gentoo -
Copyright 2004 S&P Softwaredesign
Valid XHTML1.1 : Valid CSS : buttonmaker
- Level Triple-A Conformance to Web Content Accessibility Guidelines 1.0 -
- Copyright and legal notices -
Time to create this page: 13.9 ms
system status display