aboutsummaryrefslogtreecommitdiffstats
path: root/get-password
blob: caa783ac51b01d21ef6b5522fb7be021bc0ad845 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/sh
# $Id$
# helper script for rpm scriptlets to get a random password

if [ -n "$1" ]; then
    length=$1
else
    length=8
fi

perl -e "@c = (a..z,A..Z,0..9); print map { @c[rand @c] } 0..$length"